<---- template headericclude ----->
Configure Keyboard key to behave differently
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2008
    Location
    Bangalore, India
    Age
    40
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Configure Keyboard key to behave differently

    Hi,

    My Left arrow key on my laptop keyboard just got screwed. It wont work any more, so i thought that i would configure the right ctrl to act as the left arrow key. For this i launched the following command

    xmodmap -e "keycode 97 = Left"

    97 being the keycode for the right ctrl key (as reported by showkey)

    But the above command does not make any difference. I also tried adding the line
    keycode 97 = Left
    in /etc/X11/Xmodmap, and restarting X server. Still nothing.

    Can you please help me in understanding how this is to be done.
    I use KDE 4 on my Fedora 15, updated with the latest packages from the yum repos.

    Looking forward to your responses.

    Thanks and Regards
    ~Sameer

  2. #2
    Join Date
    Sep 2005
    Location
    Redneck Riviera
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Configure Keyboard key to behave differently

    I'm not certain, but I think showkey is for texmode (non-GUI).

    Code:
    xmodmap -pke | grep Control
    
    keycode  37 = Control_L NoSymbol Control_L
    keycode 105 = Control_R NoSymbol Control_R
    shows that keycode 105 maps to Control_R (they key next to left arrow).

    By the way, xev will show "X events" (like keypresses). Xmodmap will also accept keycode definitions on the commandline, without having to modify /etc/X11/Xmodmap, restart X, etc.

    Try
    Code:
    xmodmap keycode 105 = Left
    then, if it works OK, you can add it to /etc/X11/Xmodmap.

    P.S. It's been a while since I've had to mess with xmodmap, so I don't know how much (more) help I can give.
    Last edited by cazo; 8th November 2011 at 11:56 PM.

  3. #3
    Join Date
    Apr 2008
    Location
    Bangalore, India
    Age
    40
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Configure Keyboard key to behave differently

    Hello,

    Thanks for the information. I was able to get it work using

    xmodmap -e "keycode 105 = Left"

    But what i am noticing is that the Ctrl key press is also received when the Right Ctrl key is pressed. i.e. i can do Ctrl + C, etc using the Right Control key. Due to this i am having trouble enable autorepeat for the Right Control key using

    xset r 105

    Any ideas?

    Thanks and Regards
    ~Sameer

  4. #4
    Join Date
    Sep 2005
    Location
    Redneck Riviera
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Configure Keyboard key to behave differently

    That's probably because Control_R is also a "modifier" key (along with Control_L, Shift_L, Shift_R, Alt_L, Alt_R, etc). xmodmap -p shows these. My guess is that you'll probably have to undefine Control_R as a modifier and make it just like the original Left (keycode 113 = Left NoSymbol Left).

    That would also (likely) mean using only Control_L for the control+key combinations (like Ctrl+C).

    Other options would be: pick another key (or key combination) to take the place of left arrow, use the left arrow on the number keypad (4), or repair/replace you laptop's keyboard.

    I think the repair/replace option is probably your best bet. Since it "just got screwed", the key might just be dirty and is no longer making contact.

    Good luck.

  5. #5
    Join Date
    Apr 2008
    Location
    Bangalore, India
    Age
    40
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Configure Keyboard key to behave differently

    Hi,

    Thanks for the response, Could not get it working.
    I think i will go ahead and replace the keyboard (i think its beyond repair, i dropped liquid on it).

    Your comments were very helpful.

    Thanks and Regards
    ~Sameer

Similar Threads

  1. How to configure your Gnome Terminal window size with keyboard shortcuts.
    By benjo in forum Guides & Solutions (Not For Questions)
    Replies: 3
    Last Post: 18th March 2010, 04:47 PM
  2. Replies: 1
    Last Post: 18th March 2008, 06:00 PM
  3. Replies: 2
    Last Post: 22nd May 2006, 12:04 AM

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
  •  
[[template footer(Guest)]]