Alternative modifier keys

A forum about the Hatari ST/STE/Falcon emulator - the current version is v2.2.0

Moderators: simonsunnyboy, thothy, Moderator Team

Count
Atari nerd
Atari nerd
Posts: 47
Joined: Sat Sep 16, 2017 9:15 am
Location: Castrop-Rauxel, Germany

Alternative modifier keys

Postby Count » Mon Sep 30, 2019 5:51 pm

I have a question regarding the modifier key which can be set to change configuration settings or just show Hatari's menu. Is the right Alt key the only possible modifier key?

I am asking because I "planted" a Raspberry Pi into an Atari 520 case using an Arduino Leonardo to connect the original keyboard. As most of you will know, this keyboard doesn't have a right Alt key.

Aranym, for example, allows any combination of keys to do anything, such as "left Shift + left Control + left Alternate + X".

User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2048
Joined: Sun Jul 31, 2011 1:11 pm

Re: Alternative modifier keys

Postby Eero Tamminen » Fri Nov 01, 2019 11:38 pm

Any of the keys not mapped to Atari keys, acts as shortcut modifier: KMOD_RALT|KMOD_LMETA|KMOD_RMETA|KMOD_MODE

(AltGr is Right-ALT)

joska
Hardware Guru
Hardware Guru
Posts: 4543
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Alternative modifier keys

Postby joska » Sat Nov 02, 2019 11:10 am

How many keys on an ST keyboard *isn't* mapped to Atari keys? ;)

In this case I'd modify the Leonardo code to generate an Alt event when a certain key combination or sequence is pressed. E.g. a triple press on Alternate simulates a hold down Right Alt, another press on Alt releases it.
Jo Even

VanillaMiNT - Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2048
Joined: Sun Jul 31, 2011 1:11 pm

Re: Alternative modifier keys

Postby Eero Tamminen » Sun Nov 03, 2019 11:24 pm

Sorry, I meant that any *modifier* key that's not mapped to ST, can be used as Hatari shortcut modifier.

If you want something that acts in key press patterns, I think you need some external program to do that.

(It might be something one can do in Hatari's Python GUI, if one is fluent in Python etc.)

joska
Hardware Guru
Hardware Guru
Posts: 4543
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Alternative modifier keys

Postby joska » Mon Nov 04, 2019 7:56 am

Eero Tamminen wrote:If you want something that acts in key press patterns, I think you need some external program to do that.


No, you only need to modify the Leonardo code. I think that's the cleanest solution, as it requires no special handling on the RPi at all.
Jo Even

VanillaMiNT - Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2048
Joined: Sun Jul 31, 2011 1:11 pm

Re: Alternative modifier keys

Postby Eero Tamminen » Tue Nov 05, 2019 12:13 am

One can also use Hatari Python UI to create dialogs with which one can enter pre-determined strings or specific key presses to the Hatari window. What the dialogs should contain, is specified on the Python UI command line.

(The main reason why I originally wrote Hatari's Python UI was that Nokia's 770 / N800 / N810 Internet tablets and N900 phone were missing some of the keys from Atari keyboard...)

Count
Atari nerd
Atari nerd
Posts: 47
Joined: Sat Sep 16, 2017 9:15 am
Location: Castrop-Rauxel, Germany

Re: Alternative modifier keys

Postby Count » Tue Nov 05, 2019 5:14 pm

joska wrote:In this case I'd modify the Leonardo code to generate an Alt event when a certain key combination or sequence is pressed. E.g. a triple press on Alternate simulates a hold down Right Alt, another press on Alt releases it.

That's a great idea.
:cheers:

I modified the code so that the combination of right shift + caps lock simulates right alt. I think, that's pretty natural to the user as both keys are in the same area and it works very well.

And while modifying the code anyway, I also changed it to deliver numpad scan codes when using the numpad keys. That gives me the opportunity to enter ASCII codes, too.


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 9 guests