ctrl-alt-2 as at (@)

Ingo Krabbe ikrabbe.ask at gmail.com
Sat Jun 6 07:44:42 PDT 2015


Sorry for the noise, but as I wrote in my first reply, xmodmap does not have any desired effect.
With my tests, all I can change is normal and shifted behaviour. So only the first two columns of a
keycode definition has an effect in the keysym output. I assume that is because evdev processes the codes in some other way. For example Alt + 2 gives ⁲ (twosuperior) in my terminal, whatever I configure with xmodmap.

xkbcomp -xkb :0 /tmp/xkbfile

shows 

    key <AE02> {
        type= "FOUR_LEVEL",
        symbols[Group1]= [               2,        quotedbl,               3,       oneeighth ]
    };

after some xmodmap experiments, but still Alt+2 give ⁲ and Alt+Shift+2 gives ¢ (cent).

Conclusion: Whatever I do, there is another layer of processing that isn't affected by xmodmap or xkbcomp at all.



> Hi,
> 
> Thank you for the suggestion. I tried to explain in the first email that I
> had tried to do it with xmodmap. But I don't know how to do it. And the
> manual does not explain how to make such keyboard combos.
> 
> Could anyone explain how to do it? Or show me where in the manual I should
> read?
> 
> The keycodes are
> Control_L: 37
> Alt_L: 64
> 2: 11
> 
> 
> KeyPress event, serial 36, synthetic NO, window 0x1e00001,
>     root 0xc0, subw 0x0, time 25387407, (102,88), root:(696,396),
>     state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
>     XLookupString gives 0 bytes:
>     XmbLookupString gives 0 bytes:
>     XFilterEvent returns: False
> 
> KeyPress event, serial 36, synthetic NO, window 0x1e00001,
>     root 0xc0, subw 0x0, time 25389794, (102,88), root:(696,396),
>     state 0x4, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
>     XLookupString gives 0 bytes:
>     XmbLookupString gives 0 bytes:
>     XFilterEvent returns: False
> 
> KeyPress event, serial 36, synthetic NO, window 0x1e00001,
>     root 0xc0, subw 0x0, time 25397355, (102,88), root:(696,396),
>     state 0xc, keycode 11 (keysym 0x32, 2), same_screen YES,
>     XLookupString gives 1 bytes: (00) ""
>     XmbLookupString gives 1 bytes: (00) ""
>     XFilterEvent returns: False
> 
> 
> Best regards
> Knut
> 
> 2015-06-06 13:05 GMT+02:00 Matthias Apitz <guru at unixarea.de>:
> 
>> El sábado, 6 de junio de 2015 12:55:55 (CEST), Knut Olav Bøhmer escribió:
>>
>>> Hi,
>>>
>>>
>>> I have a USB keyboard with a special "@" button that sends ctrl-alt-2 when
>>> pressed.
>>> I have been unable to configure xorg to use this button as an @, and I
>>> can't find anyone who know how to do this.
>>>
>>> My workaround is to make a keyboard shortcut in the window-manager to run
>>> "xvkbd -xsendevent -text @" when ctrl-alt-2 is pressed.
>>> I have not tested it in a production environment, but it works on my
>>> computer.
>>>
>>> I would also like to learn how to do this the proper way to do it. It is
>>> embarrassing that I have run linux for over 20 years, and still can not
>>> configure a keyboard. People makes fun of me :(
>>>
>>> I tried to do it with: xmodmap -e  "add mod3 = Alt_L Control_L"; but that
>>> does not make mod3 in to a combination of Alt_L and Control_L as far as I
>>> understand. It only maps Alt_L to mod3 and Control_L to mod3. I was able
>>> to
>>> do this in the console by creating a file with dumpkeys and adding
>>> "control
>>> alt keycode   3 = at" then loading it with loadkeys.
>>>
>>> I was hoping it would be possible to do something similar with xorg.
>>>
>>> This is the keyboard:
>>>
>>> http://www.tastaturen.com/ergebnis.lasso?-session=shop:42F941961dfbe2AB4DjsnH32421E&kn=2504&vo=p&lng2=e
>>>
>>> Best regards
>>>
>>
>> Hello,
>>
>> Use xev(1) to see what keycode it is sending on press/release and than map
>> it with xmodmap(1) to the proper keysym.
>>
>> HIH
>>
>> matthias
>>
>>
>> --
>> Sent from my Ubuntu phone
>> http://www.unixarea.de/
>> _______________________________________________
>> xorg at lists.x.org: X.Org support
>> Archives: http://lists.freedesktop.org/archives/xorg
>> Info: http://lists.x.org/mailman/listinfo/xorg
>> Your subscription address: %(user_address)s
> 
> 
> 
> 
> -- 
> Knut Olav Bøhmer
> 41 000 108




More information about the xorg mailing list