Re: [hatari-devel] Hatari keyboard mapping

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Thomas,

In my frustration, I did not give you that important information. I am using SDL2 on Hatari 2.0.0. Your suggestion worked perfectly. Yesterday, I did notice where the F11 and F12 keys could be remapped in the menu. In my case, I can use the macOS shortcuts instead so I do not need F11 and F12.

Is there a way I can use modifier keys in keymap.txt? For example, use Ctrl-F11,98 for the Help key?

Thanks again for your help. Hopefully, the manual can be updated with the new keymap information for SDL2.

Bob C


> On Feb 2, 2017, at 3:16 AM, Thomas Huth <th.huth@xxxxxx> wrote:
> 
> On 02.02.2017 03:56, Bob Carpenter wrote:
>> I admit I have been going crazy this evening trying to remap the keyboard to get the ST’s Help and Undo keys. I thought I had this working a long time ago but, when I tried to change the values in the keymap.txt file, the Help key is still mapped to F13 and the Undo key is mapped to F14. Unfortunately, the base Mac keyboard that I am using again does not have an F13 or F14 key so I am unable to press the key that generates a Help or Undo key.
>> 
>> I have even done ridiculous things like remap the Help key to the Tab key. However, when using Word Writer ST, it only generates a Tab key and not the Help key I anticipated.
>> 
>> I have checked the settings and the keyboard is set to File and points to the keymap.txt on my Desktop. The default hatari.cfg points to a keymap.txt file that no longer exists.
>> 
>> What I would like to do is either reuse F11 and F12 for Help and Undo or use the modifier keys (Shift-F1, Shift-F2) to generate the Help and Undo keys. I have looked at keymap.c to find the ST scancode and SDL_keysym.h to see the scancode generated by the Mac, but I am still doing something wrong. If someone can point me in the correct direction, I would really appreciate it.
> 
> Are you using a SDL1 or a SDL2 build of Hatari? Unfortunately, the
> keyboard mapping codes changes between SDL1 and SDL2, so that might be
> the reason for your current trouble.
> But starting with Hatari 2.0, we now also support mapping via key names.
> So to map the Help and Undo key to F11 and F12, the following keymap
> should do the job (untested):
> 
> F11,98
> F12,97
> 
> Of course you also got to map the normal menu and fullscreen shortcuts
> to other keys first, but that can now be done in the menu, so it should
> be quite easy.
> 
> Hope that helps,
>  Thomas
> 
> 
> 




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/