CityAceE The only thing missing now is the ability to type in Cyrillic. Is there any possibility to add a Russian layout to the keyboard in addition to the existing ones?
Glad you asked. 😄 That feature has been in Engine BASIC since all of last Thursday. You can put a UTF-8 text file in /sys/kbd
(say, /sys/kbd/Russian.txt
) that contains lines of this format:
<SDL scancode> <unshifted character> <shifted character> <AltGr character> <shifted AltGr character>
The keyboard layout will be initialized with the US keys, so you only have to specify the keys that differ. Scancodes have to be specified as decimal or hexadecimal numbers. (SDL scancodes are AFAICT identical to USB scancodes.)
I have added an Italian layout as a PoC, because that required few changes:
# Italian keyboard layout
0x35 = \ |
0x1f = 2 "
0x20 = 3 £
0x22 = 5 % €
0x23 = 6 &
0x24 = 7 /
0x25 = 8 (
0x26 = 9 )
0x27 = 0 =
0x2d = ' ? `
0x2e = ì ^ ~
0x08 = e E €
0x2f = è é [ {
0x30 = + * ] }
0x33 = ò ç @
0x34 = à ° #
0x32 = ù §
0x64 = < >
0x36 = , ;
0x37 = . :
0x38 = - _
You can switch between keyboard layouts using [AltGr] + [RCtrl] + [<n>]
(n
being a number), and you can toggle a keyboard layout hint with [F1]
.