Problems with keyboard mapping

By AxelStone

Prophet (3048)

AxelStone's picture

28-08-2015, 18:33

Hi, I'm having troubles with keyboard mapping in OpenMSX in Windows 7. I can't write special chars as {,},#, etc. I'm using NMS8245 with international keyboard, but when I try to use then with shift + position where they are suposed, the keys are not there. I've tried along all keys, but no one works.

It's strange because on Ubuntu 14.04 using OpenMSX, the keys are typed like they are typed on the OS, this is Altgr+3=# (I don't need to search the equivalent on MSX keyboard).

Someone can help? Thanks.

Login or register to post comments

By Grauw

Ascended (10062)

Grauw's picture

28-08-2015, 19:06

There’s a kbd_mapping_mode setting, changing it may help.

By AxelStone

Prophet (3048)

AxelStone's picture

28-08-2015, 20:22

Hi, I've tried it, it solves partially the problem:

set kbd_mapping_mode KEY -> Now it works as MSX keyboard, so it's keys are in the original MSX place. At least I can use #.
set kbd_mapping_mode CHARACTER -> I deduce this was the original mode. It doesn't send the right char (#, {, etc).

The only problem of KEY mode is that you must remember the original position of keys in MSX keyboard. Why CHARACTER mode works on Ubuntu but not in Windows? Sad

By tvalenca

Paladin (747)

tvalenca's picture

28-08-2015, 21:25

because Linux and Windows have different procedures to associate a keyboard scancode to a character. (and Mac too, I do have some issues at home). It seems windows translate keyboard scancodes to an intermediate code before translating it again on characters. This is clear when you have some kind of crash and you have some modifier keys "stuck", so you will have trouble typing until you remember this AND use the exact modifier key that got stuck (if right shift got stuck doesn't matter how many times you press left shift, you'll have to press right shift and some key to release that "ghost status")

My problem on Mac? I use United States layout, but because I have to type in portuguese I configured it to "international" layout, so some keys are now dead keys, like the quote/double-quote key next to enter key. When I use this key (to get colon or asterisk symbols on japanese layouts) I have to press it twice and delete the extra character, because if i press it once i get nothing! This is the same with all other dead-keys: (namely Shift-6 where is circumflex mark)

By Manuel

Ascended (18148)

Manuel's picture

28-08-2015, 22:20

Not really much I can add here. Apparently the SDL implementation for this is quite unreliable on Windows and Mac in cases a more exotic (non-QWERTY) keyboard or keyboard layout is used. It's not something we can reasonably fix, I'm afraid.

By AxelStone

Prophet (3048)

AxelStone's picture

28-08-2015, 23:13

Manuel wrote:

Not really much I can add here. Apparently the SDL implementation for this is quite unreliable on Windows and Mac in cases a more exotic (non-QWERTY) keyboard or keyboard layout is used. It's not something we can reasonably fix, I'm afraid.

Sorry to ear that Sad . Very well for Ubuntu, bad for Windows or Mac

By sd_snatcher

Prophet (3471)

sd_snatcher's picture

29-08-2015, 02:09

Yes, I can confirm the problem on Mac. The workaround I have here is to set up two keyboard layouts: US and US-International. (In fact I also have the Brazilian ABNT2 for when I connect that kind of keyboard from time to time).

When running openMSX, I just hold CMD and press SPACE to quickly select between the keyboard layouts, and select the standard US one (without dead keys). A quick CMD+SPACE press also advances to the next layout without showing the selection window.

To avoid confusion, I also enabled the "Show Input menu in menu bar" option on Preferences->Keyboard. This way an icon of the current selected layout is always shown in the OS-X menu bar.