OpenMSX question: How to bind keys...

Page 5/5
1 | 2 | 3 | 4 |

By ren

Paragon (1876)

ren's picture

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? :)

By Manuel

Ascended (18160)

Manuel's picture

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.

By ren

Paragon (1876)

ren's picture

09-12-2019, 16:02

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

By Manuel

Ascended (18160)

Manuel's picture

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.

By Manuel

Ascended (18160)

Manuel's picture

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...)

By ren

Paragon (1876)

ren's picture

24-08-2021, 11:35

ATM I'm not sure how I can bind e.g. rctrl+end? Only the more generic ctrl+end seems to work (which then maps to both ctrl keys).

rctrl is interesting, as it's (by default) not mapped to any MSX key, so it's safe to use (unlike lctrl (ctrl) & lalt (graph)..)

- edit: oh wait, I already had the feeling I was overlooking something, rctrl is the default dead (accents) key (but we can miss that ;))

By ren

Paragon (1876)

ren's picture

25-08-2021, 12:12

Oh yeah, thanks for the last 2 msgs, must have missed the confirmation request. So yes now it would simply be bind lalt {keymatrixdown 4 4} what worked earlier (bind lalt,alt {keymatrixdown 4 4}) doesn't seem to do anything anymore (doesn't generate an error msg either).

So.. No cigar ATM? Smile And (although I don't think I would have an immediate use for it, but more for the sake of completeness) would it be possible to bind (common) media keys? I do see them listed in the SDL_Keycode table.

Page 5/5
1 | 2 | 3 | 4 |