Results 1 to 2 of 2

Thread: Remap a single key (or keymapping in general)

  1. #1

    Default Remap a single key (or keymapping in general)

    Hi,

    I want to remap a single key on my keyboard. This is the key which will delete or in numpad mode will put a '.' or a ',' in my case.

    I want the ',' to be a '.' .

    So I found out that xev gives me some information about the keys.

    So I tried something like

    xmodmap -e 'keycode 91 = period'

    Which is not what I want. Because than the delete command gets overwritten instead of the comma. So I tried

    xmodmap -e 'keysym 0x0 = period'

    Which looked like a endless loop to me. 0x0 is also quite strange, isn't it? But this is what xev gave me for numlock activated and the comma-key.

    The difference between the delete and the comma is the "state".

    Xev returns for delete:
    Code:
    KeyRelease event, serial 34, synthetic NO, window 0x4800001,
        root 0x10c, subw 0x0, time 1934052, (412,580), root:(416,605),
        state 0x0, keycode 91 (keysym 0xffff, Delete), same_screen YES,
        XLookupString gives 1 bytes: (7f) ""
        XFilterEvent returns: False
    The comma key gives:
    Code:
    KeyRelease event, serial 34, synthetic NO, window 0x4800001,
        root 0x10c, subw 0x0, time 1323230, (350,498), root:(354,523),
        state 0x10, keycode 91 (keysym 0x0, NoSymbol), same_screen YES,
        XLookupString gives 0 bytes:
        XFilterEvent returns: False
    The difference is the state. So the questions: How do I get the comma to behave like period/dot?

  2. #2

    Default Re: Remap a single key (or keymapping in general)

    Okay

    Code:
    xmodmap -pke
    lead me to

    Code:
    xmodmap -e 'keycode 91 = KP_Delete period KP_Delete period KP_Delete period'
    Which does the trick. Thank you for reading.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •