tvOS keyboard language - xcode

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

Related

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

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.

Is it possible to use default keyboards on the device for AirConsole?

Using the Airconsole plugin for Construct.
I added a text input to the controller.html and it opens up my default android keyboard when I click it. Yet when I type, none of the keys are recognized (except space). I can paste into it though.
Do I have to use the keyboard code that Airconsole has in their Github, or is there a way to use default device keyboards?
AirConsole recommends to use the AirConsole keyboard
https://github.com/AirConsole/airconsole-keyboard
as it solves some problems like falling out of the fullscreen.

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.

Can I use the Cocoa-touch onscreen keyboard in a regular Cocoa application?

I currently have a program written in Cocoa and I would like it to have an onscreen keyboard as I am thinking of using a touch-screen monitor and would like to not have a keyboard for this particular piece of software.
I know there is an onscreen keyboard in Cocoa-touch, but as far as I am aware, that can only be used on the iPhone, iTouch and iPad.
Is there anyway I can use it in a regular Cocoa application?
Thanks
UIKit isn't part of Mac OS X, unfortunately, so you can't use anything from it. There is an onscreen keyboard that you can enable in the system's Language & Text preference pane, but I don't know how you'd do it programmatically. If this is a major requirement for your system, though, it would probably be better to roll your own. OS X is not really designed for touchscreens and has just recently gotten the most rudimentary support for touch-y interaction (thanks to the Magic Mouse and the MacBooks' trackpad).
Unfortunately, the on-screen keyboard is part of UIKit, which is only available on iOS. The only (hacky) option that I'm aware of would be to run your app in the iPad simulator. Not ideal, for sure and I'm not sure how the simulator handles a multi-touch capable display.

How can I eliminate dead keys on Mac OS X with international keyboard?

The keys ^¨~ ´` etc are dead keys on my swedish keyboard on Mac OS X (or half-dead since they start b typing the letter and then wait for the next character until the decision is made).
How can I turn this off to make them fully live?
Ukelele is an editor for Mac OS X keyboard layouts. I haven't used it for eliminating dead keys but it knows about them and provides very detailed access to the layout. I'm optimistic that you can create a new keyboard layout (from an existing one) without dead keys. (I'm using myself an enhanced keyboard layout to have access to German umlauts on a US keyboard.) A keyboard layout goes into ~/Library/Keyboard Layouts and can be activated in the International system preference pane.
As per information from Ukelele site:
A more flexible, cross-plaform keyboard utility for macOS 10.7 (Lion) and later is Keyman. However, Keyman does not use the same .keylayout files as Ukelele and requires additional software to use.

Resources