OpenMSX question: How to bind keys...

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

Van ren

Paragon (1455)

afbeelding van ren

07-12-2019, 11:34

Thanks, so it's not really broken, just have to add the generic modifier to the key-down (as it is now). So e.g. for Uchūsen Gamma, binding (map) M to LALT:

bind lalt,alt {keymatrixdown 4 4}
bind lalt,release {keymatrixup 4 4}

Would be nifty btw if keymappings like this could be configured with just one command? :)

Van Manuel

Ascended (16639)

afbeelding van Manuel

07-12-2019, 17:18

Good idea, if I have some time again, I'll make a nice script for it Smile Of course, you can beat me to it.

Van ren

Paragon (1455)

afbeelding van ren

09-12-2019, 16:02

Oh, didn't think about that option Smile Let's see who will beat whom to it Wink

Van Manuel

Ascended (16639)

afbeelding van Manuel

26-04-2020, 11:08

ren wrote:

Thanks, so it's not really broken, just have to add the generic modifier to the key-down (as it is now). So e.g. for Uchūsen Gamma, binding (map) M to LALT:

bind lalt,alt {keymatrixdown 4 4}
bind lalt,release {keymatrixup 4 4}

Would be nifty btw if keymappings like this could be configured with just one command? :)

It should work as before now. Please confirm with the latest dev build.

Van Manuel

Ascended (16639)

afbeelding van Manuel

01-06-2020, 00:18

Manuel wrote:

Good idea, if I have some time again, I'll make a nice script for it Smile Of course, you can beat me to it.

Here's a very simple initial version...

proc bind_msx_key { key matrix_row matrix_bit } {
	bind $key "keymatrixdown $matrix_row [expr 1 << $matrix_bit]"
	bind $key,release "keymatrixup $matrix_row [expr 1 << $matrix_bit]"
}

There's actually knowledge on key names of keymatrix positions in the _osd_keyboard.tcl script that could be generalized and used to replace the row and bit into an MSX key name. But it would only work for the international keyboard layout. Similar knowledge is also in the unicodemaps files. At some point in the future, I intend to make that information more widely available to scripts, so perhaps then that info can also be used to make this better. And that stuff does know about different keyboard layouts (with some bugs, probably).

Also, something like tab-completion for the keys would probably also make sense. (I think we have it somewhere, but I can't find it now...)

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