Can't get to the 'Yen' character

Por Gregory

Expert (93)

Imagen del Gregory

11-05-2015, 15:05

I'm currently using openMSX with an FS-A1GT emulated.
My problem is that I can't get to the 'yen' character on my keyboard which should be a backlash '\' on my PC keyboard.
I think that my problem is that my right-ALT key is an ALT-GR key.
In order to type a backlash I need my 'ALT-GR'-key, but this key is mapped to the 'KANA'-key.

This problem is also mentioned in the manual:

Host key that maps to the MSX CODE/KANA key.

It is especially useful for people with AZERTY host keyboard, on which the right-ALT key (RALT, which is the default value of this setting) has a special function; it is called the ALT-GR key and it's used to enter some special characters (some keys are tagged with 3 characters; normal, key+SHIFT, key+ALT-GR).

It is also useful for people with a Japanese (jp106) keyboard; they can map the HENKAN_MODE key (which is similar to the KANA Lock on Japanese MSX models) to the CODE/KANA key.

usage:
set kbd_code_kana_host_key Shows the current setting
set kbd_code_kana_host_key MENU Binds the MENU key on the host keyboard to the MSX CODE/KANA key
set kbd_code_kana_host_key HENKAN_MODE Binds the HENKAN_MODE key on the host keyboard to the MSX CODE/KANA key

So I tried:

set kbd_code_kana_host_key MENU, but this doesn't seem to do anything.
If I push the 'MENU''-button I still get the normal openMSX menu but my 'ALT-GR'-key is still mapped to the 'KANA'-key, so I'm still not able to type a 'backlash'.

I checked it and:

'set kbd_code_kana_host_key' gives me MENU
Does someone have a solution for this problem?

Login sesión o register para postear comentarios

Por mars2000you

Enlighted (5467)

Imagen del mars2000you

11-05-2015, 16:21

I've also experienced this kind of problem with blueMSX on Windows 7 and 8 (probably also Vista has this problem on AZERTY keybards).

The most easy solution is to add the English language/US keyboard in the Configuration Panel/Language and to switch to ENG when using the emulator. This way the US QWERTY keyboard 'replaces' the AZERTY keyboard and the ALT GR key will act as a real Right ALT key.

I don't know if this solution will work with openMSX, but you can try.

Por Gregory

Expert (93)

Imagen del Gregory

11-05-2015, 16:36

Problem is that when I try this I get stuck with a qwerty keyboard in openMSX, so that if I type 'azerty' I get 'qwerty'.
That is not what i'm looking for, I just want to adjust my ALT-GR key and leave all the other keys as they are.

Por Manuel

Ascended (15288)

Imagen del Manuel

11-05-2015, 17:34

FYI: on my QWERTY keyboard I can simply type a \ to get the Yen sign. I have no experience with AZERTY myself. I'll ask Alex, I think he does.

Por Gregory

Expert (93)

Imagen del Gregory

11-05-2015, 20:38

I enabled keyboard trace logging and this is what I get when I press ALTGR and '<>\':

Key pressed, unicode: 0x0000, keyCode: 0x00132, keyName: LCTRL
Key pressed, unicode: 0x0000, keyCode: 0x40133, keyName: RALT+CTRL
Key pressed, unicode: 0x005c, keyCode: 0xc003c, keyName: LESS+CTRL+ALT
Key released, unicode: 0x0000, keyCode: 0x00133, keyName: RALT
Key pressed, unicode: 0x005c, keyCode: 0xc003c, keyName: LESS+CTRL+ALT
Key released, unicode: 0x0000, keyCode: 0x4c003c, keyName: LESS+CTRL+ALT,RELEASE
Key released, unicode: 0x0000, keyCode: 0x480132, keyName: LCTRL+ALT,RELEASE
Key released, unicode: 0x0000, keyCode: 0x400133, keyName: RALT,RELEASE

Also I found a following thread:

http://www.msx.org/forum/msx-talk/openmsx/alt-gr-not-working?page=0

Alex wrote:

I have read the SDL thread mentioned a few posts above and it is indeed an issue with Windows itself. Windows maps alt-gr to CTRL+RALT. Reason for this strange mapping is that not all keyboards have a physical alt-gr key. Instead of accepting this fact, Microsoft has tried to make the non-existence of this key on some keyboards transparent to application developers by reversing the logic; Microsoft has decided that pressing the alt-gr key on the physical keyboard will be mapped by Windows to pressing the physical keys CTRL+RALT at the same time. In this manner, applications that wish to detect that a user presses alt-gr can check for CTRL+RALT at the same time being pressed so that users can emulate pressing alt-gr on any keyboard. However, by taking this strange decision, applications are no longer able to distinct between users pressing the physical alt-gr key versus users pressing CTRL and RALT at the same time...

So apperently this is a problem that can't be fixed rapidly.

Por Manuel

Ascended (15288)

Imagen del Manuel

11-05-2015, 20:49

So, I wonder what Alex uses as a workaround then Smile

Por Gregory

Expert (93)

Imagen del Gregory

11-05-2015, 21:02

I'll try to assign the 'yen' symbol to 'F6'.

bind F6 "keymatrixdown 1 0x10"
bind F6,release "keymatrixup 1 0x10"

Yep, that seems to do the thrick... oO

Por Alex

Master (205)

Imagen del Alex

14-05-2015, 11:27

I don't need to workaround the issue; I use linux and not windows and on linux it works fine.

The problem is that SDL on Windows does not implement a workaround for the strange behaviour of Windows. The result is that SDL does not provide the correct character to openMSX for characters that need to be entered with the ALT-GR key. There is nothing I can do about it in the openMSX code on Windows. I can only hope that SDL 2 better supports Azerty keyboards on Windows so that the problem will be solved when we eventually migrate from SDL 1 to SDL 2. But I can't guarantee this. I have not yet experimented with SDL 2 on Windows.

Por Gregory

Expert (93)

Imagen del Gregory

14-05-2015, 13:32

The way I see it now is that an azerty keyboard will just get me in to trouble when using openMSX. I guess the logical solution is to buy a 'qwerty' keyboard that doesn't have an 'ALTGR' key. They can be bought very cheaply and I have one comming my way so I hope that all my troubles go away and that I ca use openMSX to its full potential.

My MSX profile