Tuesday, 29 April 2014

Keyboard layouts

This allows me to easily support new keyboard layouts, even without knowing anything about given layout or language. So far I have implemented support for following layouts:

English (en-US),

Polish (pl-PL),

German (de-DE),

Russian (ru-RU).

Each KeyboardLayout subclass allows to:

type text using given layout: void type(String text);

get character associated with given key, based on current state of Caps Lock, Shift and right Alt keys: char getChar(int scanCode, boolean capsLock, boolean shift, boolean altGr);

It is important to remember about following limitations:

user make sure that USB host uses the same layout as the application. Application has no way of knowing what layout is currently used by USB host.

obviously, once you use a given layout, only characters defined for the layout are available, other characters will be ignored.

USB Remote already supports previously mentioned layouts. In case of some layouts it may be a good idea to change default placement of some of keys, but that would require a bit of experience with given layout.

German layout

Polish layout

Russian layout

I'll release this version soon, along with some other minor fixes and improvements. Also, please let me know if you would like me to add other layouts.

They are also there, you just need to use "<" and ">" buttons in top row to change what set of keys will be available between them. The only limitation is that you can't make some keys combinations like for example: "F1" + "1" because they can't be displayed at the same time.