ctrl-alt-2 as at (@)

Ingo Krabbe ikrabbe.ask at gmail.com
Sat Jun 6 07:21:13 PDT 2015


Hey Knut,

sorry for the bad news, but as far as I understand it, you cannot use ctrl as a modifier with xmodmap.
>From xmodmap(1):

       keycode NUMBER = KEYSYMNAME ...
               The list of keysyms is assigned to the indicated keycode (which may be specified in decimal, hex or octal and can be determined by running the xev program).
               Up  to  eight  keysyms  may be attached to a key, however the last four are not used in any major X server implementation.  The first keysym is used when no
               modifier key is pressed in conjunction with this key, the second with Shift, the third when the Mode_switch key is used with this key and  the  fourth  when
               both the Mode_switch and Shift keys are used.

So with xmodmap you can define Plain, Shifted, ModeSwitch (aka. Alt) and Shift+Alt symbols, but no Ctrl Symbol.

Regards,

Ingo


> 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