OpenMSX question: How to bind keys...

Pagina 2/5
1 | | 3 | 4 | 5

Van wouter_

Champion (429)

afbeelding van wouter_

08-01-2015, 19:51

mars2000you wrote:

I really prefer the KEY mode ....

User preferences differ, hence it's a setting :-) For other people reading this thread, I'll give some more background info (and some small corrections).

In CHARACTER mode (the default), openMSX tries to map a character the user types on his PC to the corresponding MSX character. This matters a lot when the keyboard layout of the PC and the emulated MSX differ. For example: I'm using a US-QWERTY layout on my PC and I'm emulating a turbor machine. If I press the single-quote key on my PC keyboard, openMSX will press SHIFT+7 on the MSX (also resulting in single-quote on the MSX). If I type '@' on my PC (SHIFT+2), openMSX will simply press the '@' key on the MSX, it will also temporarily release the MSX SHIFT key. @mars2000you: so it does not only press 'missing keys', it can press totally different key combinations and even release already pressed modifier keys.

In KEY mode, there's a 1-to-1 mapping between key presses on the PC and on the MSX. Let's retake the above examples (US-QWERTY, emulated turbor). If I press single-quote on my PC, i'll get a colon character on the turbor (because that's the key on the same corresponding position). When I press SHIFT+2 on my PC (the '@' character) I also get SHIFT+2 on the turbor (resulting in a double-quote character). @mars2000you: the MSX BIOS is not involved in this process, neither in openmsx nor in blueMSX (I checked the source code).

I think both modes can be useful in different circumstances, so openMSX offers both. For non-expert users who aren't familiar with the detailed keyboard layout of all the different MSX machines, the CHARACTER mode will result in less surprises. That's why it's the default.

Now specifically for Nyyrikki's situation: when only pressing modifier keys (SHIFT+CTRL+GRAPH+CODE) both keyboard modes behave the same. So I don't expect changing the mode will solve the problem. But of course feel free to try anyway.

Van mars2000you

Enlighted (5634)

afbeelding van mars2000you

08-01-2015, 20:15

Quote:

@mars2000you: the MSX BIOS is not involved in this process, neither in openmsx nor in blueMSX (I checked the source code).

The BIOS is indirectly involved as the KEY mode gives priority to the key-value of the emulated MSX and this key-value is determined by the BIOS of the emulated MSX. This key-value can be different on an European MSX and a Japanese MSX for example, because the BIOS is different.

Van Manuel

Ascended (16685)

afbeelding van Manuel

08-01-2015, 21:36

priority? How does it work then? How is it determined? How is the BIOS used exactly?

Van mars2000you

Enlighted (5634)

afbeelding van mars2000you

08-01-2015, 21:42

I've just explained it. In the CHARACTER mode, you give priority to the PC key (or PC keys combi) in stead of giving priority to the MSX key.

Van Manuel

Ascended (16685)

afbeelding van Manuel

08-01-2015, 21:49

mars2000you wrote:

I've just explained it. In the CHARACTER mode, you give priority to the PC key (or PC keys combi) in stead of giving priority to the MSX key.

No, in CHARACTER mode you look at what the character is what is supposed to come out of the MSX (the same character as what is typed on the PC keyboard) and press the MSX keys which generate that character. It's not a matter of priority. For this openMSX has to know what kind of keyboard wiring is in the machine, which is in the config XML file of the machine.

So, I still don't understand what you meant with the BIOS remark... you wrote that the KEY mode uses the BIOS, but that's not the case, as Wouter explained.

Apparently there is some bug with Finnish keyboards. But for 'normal' keyboards, I can't think of a reason NOT to use this. Why do you change it?

Van mars2000you

Enlighted (5634)

afbeelding van mars2000you

08-01-2015, 22:13

It's the natural way when you've used several real MSX computers and when you have already used blueMSX.

In your doc, you're giving an example 'promoting' the CHARACTER mode with a PC AZERTY keyboard (that we use in Belgium), but my feeling is different. When switching from blueMSX to openMSX to make some tests, I want to have the same keyboard layout as in blueMSX when running the same MSX machine.

Van Manuel

Ascended (16685)

afbeelding van Manuel

08-01-2015, 22:32

OK, preferences are preferences as already spelled out. I just like to get the characters I'm actually typing without having to think what the keyboard is on the real machine (which you can't see in openMSX). And it's not only that, there is also some kind of special keys which are not mappable with a KEY mode. Like keys which have totally different characters on them than you would have on your PC keyboard (symbols, or a pound key, or think of Russian JCUKEN keyboards...)

And I'm still puzzled about the BIOS thing you mentioned Tongue

Van mars2000you

Enlighted (5634)

afbeelding van mars2000you

08-01-2015, 23:19

At least in blueMSX, the KEY mode allows to get on the emulated MSX screen characters that are not on my AZERTY keyboard (including cyrillic or arabic characters). Mapping of MSX keys in blueMSX to PC keys is a full mapping, including all the MSX key properties (with or without Shift/Graph/Code), so there's no any problem.

And for the BIOS, try to remove (*) the keyboard part in the BIOS and see what it will happen. At least in blueMSX, it will not work because blueMSX does not have a keyboard description in the config.ini file of the machines (actually, since CocoaMSX exists, such description exists but is not used by blueMSX).

(*) more exactly, neutralize this part by replacing the values corresponding to the keys by FF LOL!

Van NYYRIKKI

Enlighted (5556)

afbeelding van NYYRIKKI

09-01-2015, 00:18

Manuel wrote:

Apparently there is some bug with Finnish keyboards.

Yes, I think you could say that...

Some examples of ASCII code output with Finnish keyboard, MSX tR & openMSX 0.11.0 CHARACTER mode:

"@" = 0
"\" = 28 (= right)
"|" = 28 (= right)
"}" = 42,29 (= "*", left)
"]" = 29,47 (= left, "/")
"[" = 27 (=Esc)
"{" = 27 (=Esc)
"|" = 28 (= right)

Other than this, if I type any of keys "@£$€{[]}\~|µ" the keyboard will also change Kana-lock mode permanently.

Van Grauw

Ascended (9156)

afbeelding van Grauw

09-01-2015, 00:26

What OS?

Pagina 2/5
1 | | 3 | 4 | 5