Re: [hatari-devel] Hatari keyboard mapping |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: Hatari devel list <hatari-devel@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [hatari-devel] Hatari keyboard mapping
- From: Bob Carpenter <hatari@xxxxxxxxxx>
- Date: Thu, 2 Feb 2017 06:34:09 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ripon89-us.20150623.gappssmtp.com; s=20150623; h=sender:from:content-transfer-encoding:mime-version:subject:date :references:to:in-reply-to:message-id; bh=OSmaS3i5x172AWerhHzmElfnBgVhi1eIyn0sjHlx52U=; b=co/CmGpayQlYY+lnTB4S1CNfGrVSaaKs274lsnQhAFbF4xEXXYvMe96JnRjNzLpPF2 GLZ9vZ3vFORoxfMUZtSNMq4BY31Z6S3ifj6pfWsjrXT/kA2rAQBWmsLvtDnTra/etHQP 0FsMsINOdTAR7GUJNszNbVgvt+5zaL1ymKZpmEI15+w5NmDIY6j4aW+TjGExCDN94QZt Gxs6Fd7znVPTE4m5H5ToAvR3bbv34YoOubmeYPIQMbq5n72XA+eM0VDzNwKZClD/uQhJ iC3IX5kK3EnNRO2xOHTLyOw4+h0574NnJd5XAYJC0j5bnp0lLjUmscTz16p/JFwVzLmq KLkQ==
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
>
>
>