Topic US and UK keyboard mappings

We have two new locations for Keyman technical support:

The Tavultesoft Forums are now read only.


# US and UK keyboard mappings   2016-02-03 23:56:05.937
br Julian Griffin OSL
Hello, I am new to Keyman, but I have used MSKLC (Microsoft's Keyboard Layout Creator tool. In Windows each keyboard layout for each country/language has a different mapping of letters to phisical scancodes of the keyboard. The US layout swaps the double quote key '"' and 'at' symbol key '@' of the UK layout.

   Whenever I test a Keyman keyboard, uses the US scancode mapping.

   My Keyman header text is:
:
store(&VERSION) '9.0'
store(&NAME) 'Trial 4'
store(&LANGUAGE) 'x0809'
store(&WINDOWSLANGUAGES) 'x0809'
store(&BITMAP) 'Trial 4.ico'
begin Unicode > use(main)

Please advise as to how I can stop Keyman from using the US mapping and make it use the UK mapping.

Thank you.
Julian Griffin
# RE: US and UK keyboard mappings   2016-02-05 07:31:18.007
Marc Durdin
Tavultesoft Staff
You can use mnemonic layouts to have the rules of your keyboard follow a different base mapping. This is not always appropriate for a given keyboard - have a read of this blog post:

http://blog.tavultesoft.com/2011/08/developing-mnemonic-layouts-for-keyman-desktop.html

The following help article has technical details:

http://help.keyman.com/developer/language/reference/mnemoniclayout
# RE: US and UK keyboard mappings   2016-02-06 10:14:57.970
br Julian Griffin OSL
Thank you for the URLs. I've look through them and I think I will stay with the positional model.

But I solved the problem with
:
+ [SHIFT K_QUOTE] > '@'
+ [SHIFT K_2] > '"'
It works, but it feels like a bit of a bodge.

Regards
Julian Griffin
# RE: US and UK keyboard mappings   2016-02-08 04:42:30.457
br Julian Griffin OSL
I've looked a little closer at the differences between the US and UK keyboard layout. The keyboard I am developing is for use on UK keyboards. The users will expect the symbols not to have moved when they switch to the TPA keyboard. So I have added to the code:
:
c Letters & symbols to make the US layout conform to the UK layout.
+ [SHIFT K_3] >       '£'
+ [SHIFT K_2] >       '"'
+ [K_BKSLASH] >       '#'
+ [CTRL ALT K_4] >    '€'
+ [SHIFT K_QUOTE] >   '@'
+ [SHIFT K_BKSLASH] > '~'

+ [SHIFT K_BKQUOTE] >          '¬'
+ [SHIFT ALT K_BKQUOTE] >      '¬'
+ [CTRL ALT K_BKQUOTE] >       '¦'
+ [CTRL ALT K_BKSLASH] >       '\'
+ [SHIFT K_oE2] >              '|'
+ [SHIFT CTRL ALT K_BKSLASH] > '|'

+ [SHIFT CTRL ALT K_A] > 'Á'
+ [SHIFT CTRL ALT K_E] > 'É'
+ [SHIFT CTRL ALT K_I] > 'Í'
+ [SHIFT CTRL ALT K_O] > 'Ó'
+ [SHIFT CTRL ALT K_U] > 'Ú'

+ [CTRL ALT K_A] > 'á'
+ [CTRL ALT K_E] > 'é'
+ [CTRL ALT K_I] > 'í'
+ [CTRL ALT K_O] > 'ó'
+ [CTRL ALT K_U] > 'ú'

   So I would make a plea that it be possible for a keyboard to be based on the keyboard layout defined in the header of a keyboard definition, eg:
:
store(&LANGUAGE) 'x0809'
store(&WINDOWSLANGUAGES) 'x0809'
store(&ethnologuecode)   'Eng'

   Not just on the US keyboard layout.

Regards
Julian Griffin
# RE: US and UK keyboard mappings   2016-02-09 06:20:57.120
Marc Durdin
Tavultesoft Staff
Thanks for the feedback; I understand the issue. I will consider the issue for future versions of Keyman Developer.