Xamarin Forms, enable softkeyboard when bluetooth keyboard is connected in Android - xamarin

Currently, i'm working on my first project with Xamarin forms and android. I have a bluetooth barcode scanner paired with android device. So softkeyboard doesn't appear when it's connected. I tried many options what i found in the internet. Such as forced softkeyboard call from CustomEntryRenderer and other places. In some cases it's possible to handle in Language/InputMethods menu in Android, but not in all phones. Maybe i'm missing something, and called code from wrong place. The question is how to show softkeyboard, even when bluetooth keyboard is connected?
InputMethodManager inputMethodManager = this.Control.Context.GetSystemService(Context.InputMethodService) as InputMethodManager;
inputMethodManager.ShowSoftInput(this.Control, ShowFlags.Forced);
inputMethodManager.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);

On my device, there are keyboard-related settings, one of which is "always show onscreen keyboard while a physical keyboard is connected". Switch this to "ON".
Apparently the default is to see the scanner not as "one of the keyboards" but "the only one", so an on-screen keyboard isn't needed. Which makes sense for a real keyboard, but not for a scanner.

Related

citrix receiver connection bar

I started a Citrix Published App on my IPad and get a citrix receiver toolbar which contains the Icons home, Active keys, ... Pointer, Magnifier on top of the screen.
On my Windows 10 tablet device, after setting ConnectionBar=1 in ica file, I also get a toolbar, but it contains different Icons. It does not contain the icons Pointer and Magnifier, which I need. Some Icons are contained in both OS's, e.g. home.
--> Is there a general difference between Windows and Mac Citrix Receiver or can I set this Icons to be displayed anyhow?
Best regards
Pointer and Magnifier have been introduced for the “new” iPad to deal with higher resolution screens - so yes, they're specific gestures of Citrix Receiver for iOS, as per Citrix documentation.
More generally speaking, in Windows 10 Magnifier is yet another of the Windows Ease of Access features (whilst in Desktop with a keyboard you could quickly open it by using the keyboard shortcut Windows key with the plus sign (+) to zoom, as suggested in windowscentral and in microsoft links, notice the "Use Magnifier with a touchscreen" paragraph in the latter).
In case of tablet and Citrix Receiver for HTML5, please refer to the recent Citrix blog: this release adds support for mobile gestures and multi-touch. Now, you can pinch and zoom, etc...

tvOS keyboard language

Is it possible to change onscreen keyboard language in tvOS?
I certainly didn't find a way of adding new keyboards in Apple TV Settings, but maybe there is a parameter you can specify on UISearchController.searchBar to switch to a different input language?
My Simulator as well as Apple TV are in English, but I'd like my app to be able to support other languages for input (e.g Russian). After all it's just a virtual on-screen keyboard.
On your apple TV go to Settings -> General -> Language, switch to the language you need (Russian). It will ask you if you're OK with Siri not being supported, hit OK, and voila :
this doesn't work in simulator unfortunately.
Also, you might try to create a custom keyboard, and make it's primaryLanguage whatever you need:
https://developer.apple.com/library/tvos/documentation/UIKit/Reference/UIInputViewController_Class/index.html#//apple_ref/doc/uid/TP40014279-CH1-DontLinkElementID_8

iOS Simulator typing in Dvorak keyboard appears as QWERTY keys

I just installed Xcode and iOS Simulator.
My Mac's Dvorak keyboard layout is not working when I type in the iOS Simulator.
When I type in Dvorak, it shows up in the iOS Simulator as if I was typing with the QWERTY keyboard layout.
I tried switching my Mac's keyboard layout back and forth but it didn't help.
Solution
There are two conditions required for simulating Dvorak input on the iOS simulator.
(short version)
In Settings > General > Keyboard > Keyboards > English > Hardware Keyboard Layout (Select
Dvorak)
In iOS Simulator Menu > Hardware > Simulate Hardware Keyboard (Must
be enabled)
(long version)
To verify:
In iOS Simulator Navigate to Settings > iCloud
Click Apple ID text field
Note - No software keyboard appears
Type qwerty on keyboard
Note output as below (Simulated Hardware Keyboard outputs according Dvorak layout)
Now turn off the Simulate Hardware Keyboard
Type qwerty on software keyboard
Note output as below (Supported QWERTY software Keyboard is shown, Supported Dvorak Hardware Keyboard Layout is used)
Why this Behavior
(long version)
After some investigation I have found that the answer to this question is that the simulated DVORAK keyboard is working exactly as intended. Only software keyboards can appear in the simulator or on the device. Dvorak is listed as a hardware keyboard, which means that when the correct option is selected one can type using the same keyboard layout as on a Dvorak keyboard.
Software Keyboard Selections (Dvorak is not an option)
Scroll to the bottom to see Dvorak
Dvorak Hardware Keyboard Support
Selecting "Simulate Hardware Keyboard" allows anyone who wants to simulate a Dvorak keyboard or has Dvorak layout on their computer (in combination with the iOS uses Same Keyboard Layout as OSX option) to type into the simulator using the Dvorak keyboard layout. However there is no software keyboard layout for Dvorak as noted above. Therefore, when this option is selected, the onscreen software keyboard is removed if one goes to a field to type in data (no Dvorak software keyboard is supported) in the simulator.
Based on the assertion that the keyboard shows up as QWERTY layout then one can assume that the Simulate Hardware Keyboard is not currently selected. Selecting this option will turn on support for a simulated hardware Dvorak keyboard layout and allow one to type in the Dvorak layout.
When the above option is enabled the software keyboard will not be shown in the simulator at all. However the Dvorak layout is now active (if one selected Dvorak under the Hardware Keyboard Layout in the Settings > General > Keyboard area).
Apple's Explanation iOS: Using International Keyboards
Activating Dvorak is a hardware keyboard simulation only.
Conclusion
The result of this test indicates that Dvorak is NOT a supported Software Keyboard. The selected software keyboards will always be shown. However the Dvorak hardware keyboard layout is supported. When Dvorak is selected as an hardware keyboard layout option on the simulator or device the output will be Dvorak.
For me (Simulator Version 7.0 (463.9.4.2)) as long as the correct hardware keyboard layout is selected, I do not need to enable "Simulate Hardware Keyboard".
Dvorak keyboard works perfectly once I go into the settings app and choose that as the hardware layout.
It's far too finicky to get the iOS Simulator to work with Dvorak.
And if you ever do get it working, it will be broken again the next time you Reset the simulator.
My solution is to use Keyboard Maestro to send the Dvorak character at the same position as the QWERTY key whenever the iOS Simulator is the active app.
So if you want to type o, set keyboard maestro to type r. The Simulator then translates this Dvorak r into a QWERTY o.
Confusing, but it always works and does not require changing settings in the Simulator.

When does the touch keyboard popup?

I'm working on a non-touch device (regular PC...) with a keyboard. I've written a Windows 8 App, which includes TextBox.
I want to launch the Touch Keyboard, when the user uses a device without a keyboard (=Tablet/Phone). How can I test it?
I.e. when I use the Visual Studio simulator for Windows 8 and choose "taps" as the gesture, the virtual touch keyboard still won't popup. Is there any specific moment where Windows is using the keyboard automatically? I'd actually like to test the Touch Keyboard to check the InputScope (i.e. InputScope="Number") and the 'look of the app', when the keyboard pops up.
If needed, my TextBox looks like this:
<TextBox InputScope="Number"/>
Edit: The keyboard pops up now (I don't know why...). I've started the simulator and used "taps" as gesture and the keyboard didn't pop up. After restarting the simulator ~5 times, it pops up now, but the InputScope is not Number...
Visual Studio 2012 comes with a Simulator that you can run your Windows 8 app in. On the right of that, you may notice buttons near the top, one that's a pointer and another that's a finger. If you use the finger, then all input will be touch input, as if there were no keyboard.

How can I simulate/emulate a gamepad in xCode?

Background:
I have a Bluetooth gamepad which I can discover and connect to through xCode. I can communicate with it through the Control and Interrupt channel and thus I can find out which buttons on the Gamepad are being pressed. I can then map this to a keyboard button.
However, most recent games look for an actual gamepad or joystick to enable multiplayer functions as only one player is allowed to play on the keyboard and mouse. Since my gamepad currently only simulates the keyboard buttons the game does not recognize a gamepad and thus will not unlock the multiplayer mode.
Question:
I have no idea where to look for, but is there a way I can simulate a gamepad so the MAC actually recognizes it as a joystick/gamepad and I can map the buttons accordingly?
I am coding in xCode 4.6.1 for a Mac OSX "Mountain Lion" APP.

Resources