Re: [AD] International keyboards problem with X

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


Michael Bukin <M.A.Bukin@xxxxxxxxxx> writes:

> Emmanuel Anne <emanne@xxxxxxxxxx> writes:
> 
> > The problem : with a french keyboard like mine, the keys "1" and "2" are
> > not recognised at all. I mean pressing it does NOT generate any
> > scancode. A few other keys might have the same problem but these 2 are
> > already very annoying.
> 
> We can use direct mapping from keycodes to Allegro scancodes.  But
> we'll need some utility to create this mapping (something similar to
> keyboard setup in old XwinAllegro).

I've added customization of X keycodes to Allegro scancodes mapping,
and made a small utility to create such mapping.

Mapping is saved in allegro.cfg configuration file and is read when
keyboard is initialized with install_keyboard.  It is stored in
[xkeymap] section of configuration file, each keycode->scancode
mapping is saved as 'keycodeX = Y', where X is keycode and Y is
corresponding Allegro scancode.

Any comments and suggestions are welcome.

All changes to src/x/xwin.c, include/xalleg.h and mapping
customization utility are included below (just uudecode this mail).


begin 644 xkeymap.zip
M4$L#!!0``@`(`/F(:RF&WB:G`0$```D"```-`!4`>&%L;&5G+F@N9&EF9E54
M"0`#A2@xxxxxxxxxx>`0`]`%D`*6/34O$,!"&S\VO&/#BDF:3UNWJ1H2*"@HK
M@GH/W29=PX9$TD__O6GWX@?%@TGF'<C,^R3S8*4:.&A;FE8J.A3&J/WR#5W]
M?Z'GFQ>HM%$<:-G5WKF&3OBC>D=_OAIWR*O&:]5INP<?4JV=A62YFKG/D-15
M!:0%XD/7I!DBA/P:*$H98Y1M:+H&MN%9RMDJ&L$8XYGF)`D'$L;9.4]9-)+S
M'$AREL9KP&.Z@#Q'<+T5CW>O]T^W<-HY+6,00Z^M""%=+Z2JBM8TSL?'\F)Q
M^9?%*^F+7HT.;9L8OLGD1WB&<%`?.U=X*<HPRJXH#U\8HQ,';]@GN@K_`B'*
M=]/68Z!/4$L#!!0``@`(`':):REW:1]>]@L``+0F```)`!4`>&ME>6UA<"YC
M550)``-P*0TZ72L-.E5X!`#T`60`W5IM<QJW%OX<?H7J.T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ISRBUC^791?]CK7]==\U>E[P29-CY--9AD0Q3
M@7_)JF/HP6:NI*HRX5CPDN'2Q-9P7#AH7FK0JC-MA!["E(@$X4[H5)XT>]/Z
M51(OW(9)73:A\G#+&^7M>X'*&W,+U$B$C_4;4$L!`A<#%``"``@`^8AK*8;>
M)J<!`0``"0(```T`#0```````0```*2!`````'AA;&QE9RYH+F1I9F955`4`
M`X4H#3I5>```4$L!`A<#%``"``@`=HEK*7=I'U[V"P``M"8```D`#0``````
M`0```*2!00$``'AK97EM87`N8U54!0`#<"D-.E5X``!02P$"%P,4``(`"`#3
MB&LI'O`+HO`"``#I!P``"P`-```````!````I(%S#0``>'=I;BYC+F1I9F95
B5`4``SXH#3I5>```4$L%!@`````#``,`T@```*$0````````
`
end


-- 
Michael Bukin



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