Re: [hatari-users] Key mapping issues

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


On Fri, 4 Jan 2019 21:49:39 +0200
Eero Tamminen <oak@xxxxxxxxxxxxxx> wrote:

> Hi,
> 
> On 1/3/19 11:10 PM, Charles Curley wrote:
> > I have an odd key mapping problem. Hatari, as of Sun Dec 16 13:31:19
> > 2018 +0200, hg commit 7269:7e5cd2b03ab7. Debian 9.x as
> > updated. Keyboard is a Logitech USB keyboard. evemu-describe does
> > not return any identifiers.
> > 
> > Hatari appears to be swapping the `/~ key with the \/| key. That is
> > to get | I have to press ~. That's a bit of a problem.  
> 
> Different TOS versions map Atari scancodes to different keys, and
> individual Atari programs can also install their own key mapping
> tables too.
> 
> As to Hatari side, there are 2 different methods for providing Atari
> keyboard scancodes to emulation, one based on libSDL key scancodes,
> and one based on libSDL key symbols.
> Have you tried both?  And a TOS version which key mapping is closest
> to what you want?

I have tried both. And both are unsatisfactory for one reason or
another. I am currently using Scancode keyboard mapping, with which I
get the above problem.

emutos is etos256us.00.09.10.img, version 0.9.10.

> 
> If you need to experiment, I'd recommend EmuTOS:
> https://sourceforge.net/projects/emutos/files/emutos/0.9.10/emutos-256k-0.9.10.zip/download
> 
> 
> > So I created a scancode file:
> > 
> > `,29
> > ~,29
> > \,2b
> > |,2b
> > 
> > The 2b codes work correctly, and | shows up on the | key. However,
> > the ~ key now acts like it's the insert key, and returns 0 and hex
> > 52 ('R'). Not good.
> > 
> > Any ideas on how to improve this?  
> 
> Hatari includes tools to investigate what SDL and Atari scancodes
> you actually get:
> https://hg.tuxfamily.org/hatari/hatari/file/tip/tests/keymap

checkkeys reports that both keys are returning the correct ASCII codes.

listkeys did nothing useful:

charles@hawk:~/versioned/hatari/tests/keymap$ ./listkeys 
Sorry, SDL2 doesn't support iterating over all keys.
charles@hawk:~/versioned/hatari/tests/keymap$

I did install and use keytest.prg.  It reports that the two keys are
returning the swapped scancodes. 

> 
> Atari scancode positions on a keyboard are shown in this image:
> 	http://eerott.mbnet.fi/hatari/img/st-keymap.png

Thanks. I had to dig out an actual 520 ST to map the characters to the
scan codes. | is 43 (to the right of Return), and ` is 41, above the
return key.

> 
> 
> 	- Eero
> 
> 



-- 
"When we talk of civilization, we are too apt to limit the meaning of
the word to its mere embellishments, such as arts and sciences; but
the true distinction between it and barbarism is, that the one
presents a state of society under the protection of just and
well-administered law, and the other is left to the chance government
of brute force."
- The Rev. James White, Eighteen Christian Centuries, 1889
Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB
https://charlescurley.com



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