Re: [AD] linux keyboard mapping?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> I updated the code to Allegro 4.x, and made it a bit more user-friendly.

Good work, it indeed makes the life easier. However I have some remarks:
- on the main screen, the name of the first box ("Default") is confusing. It 
should be "Change Allegro key mappings", the name of the current mapping 
being displayed elsewhere.
- to be even clearer, the name of the second box should be "Setup X key 
mapping" and that of the third one "Test X key mapping".
- enter the setup page and press Return: a strange thing happens. 'focus' 
should be set to 2 instead of 1 line 241.
- the layout of the whole setup page is confusing: you ought not to use dialog 
boxes for displaying text. And each dialog box ought to perform a different 
task.
- change a key from the default mapping (for example press B for KEY_A), then 
go to the test page: KEY_B has the red box! It's because you change 
_xwin.keycode_to_scancode line 277 while the key is still being held down.

> This is still not perfect (I still think it could be automated, given
> that we know the Allegro-key->unicode mappings, and could derive the
> X-key->unicode mappings), but at least for a german keyboard it's easy
> now to create the x-mapping within a minute :)

I don't see how this could be automated, unless you read the internal XFree86 
configuration file for example.

> Complete modified file is attached because I changed the
> indenting/formatting to the Allegro style and so most lines changed.
> Maybe someone using X-Windows and a non-US keyboard can test it and tell
> me if something else should be changed? (I assume it is always needed on
> a non-US keyboard, not just on my system.)

Tested on my French keyboard, appears to works fine.

> If it is accepted to go into tools/xwin, I can write a note in the docs
> for it and try to add it into the make process. I already included a
> short readme.txt.

- it's X Window ("the X Window System"), not X-Windows,
- "If Allegro's keyboard mapping still is broken, reading on probably also 
won't help": sounds a bit strange to me. I would write "If Allegro's keyboard 
mapping is still broken, reading on probably won't help" but a native English 
speaker will have to rule here,
- "HW-scancodes" line 29: raw scancodes is better I think,
- typo line 33: "keyboard",
- "which maps back the virtual keycodes of X onto scancodes": which maps the X 
virtual keycodes back to the raw scancodes,
- "Note that X-Windows may block some keys completely from user programs and 
therefore can't be detected at all.": note that X Window may completely block 
some keys which, therefore, can't be detected at all by user programs,
- "of" is superfluous line 59,
- "utility" is missing line 101,
- the paragraph starting line 101 is confusing: do you have to map all keys or 
not in order to get a fully working mapping ?

-- 
Eric Botcazou



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