LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 01-17-2013, 09:40 AM   #1
maniakk
LQ Newbie
 
Registered: Jul 2012
Location: hampton, georgia, USA
Distribution: Fedora 17
Posts: 16

Rep: Reputation: Disabled
Unhappy Reassign keyboard keys


I spilled some water on my keyboard a while back. I cleaned up the keyboard almost immediately. I noticed some of the keys didnt work. One started working shortly after cleaning it. The keys that dont work anymore are: Backspace, Apostrophe, h, and g. I figured if I didnt need my keypad (Which I dont use at all), then I would reassign those keys on my keypad. Currently, I have to search the alphabet on google and copy the letters g and h. Its getting real tedious... I know theres a way to reassign the keys, but I just dont know how to do it.

Im using Fedora 17 (Beefy Miracle) on an hp Pavillion g7 laptop.
 
Old 01-17-2013, 10:08 AM   #2
danielbmartin
Senior Member
 
Registered: Apr 2010
Location: Apex, NC, USA
Distribution: Ubuntu
Posts: 1,167

Rep: Reputation: 306Reputation: 306Reputation: 306Reputation: 306
Reassigning keys should be a last resort. Try to clean your keyboard, to restore it to as-new functionality. Google "clean my keyboard" to find advice and videos. It can be done for little or no money.

Daniel B. Martin
 
Old 01-17-2013, 10:21 AM   #3
maniakk
LQ Newbie
 
Registered: Jul 2012
Location: hampton, georgia, USA
Distribution: Fedora 17
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thumbs down

Quote:
Originally Posted by danielbmartin View Post
Reassigning keys should be a last resort. Try to clean your keyboard, to restore it to as-new functionality. Google "clean my keyboard" to find advice and videos. It can be done for little or no money.

Daniel B. Martin
I just looked at some of those tips online just now. They all suggested I take apart my keyboard. Im NOT doing that. The last time I poppeed off a key, it never went back on. Its SUPER hard to put them back on. In fact, because of this, I no longer have my E and A keys. Theyre in baggies somewhere...
 
Old 01-17-2013, 10:46 AM   #4
danielbmartin
Senior Member
 
Registered: Apr 2010
Location: Apex, NC, USA
Distribution: Ubuntu
Posts: 1,167

Rep: Reputation: 306Reputation: 306Reputation: 306Reputation: 306
Quote:
Originally Posted by maniakk View Post
I just looked at some of those tips online just now. They all suggested I take apart my keyboard. Im NOT doing that. ...
Idea #1) Google linux remap keys
You will find advice including this:
http://forums.linuxmint.com/viewtopic.php?f=90&t=108803
I'm not endorsing any particular method since I haven't tried them.

Idea #2) Replace your keyboard. Your LQ profile doesn't give your location. In my part of the world used keyboards are giveaway items. In fact, the Microsoft ergonomic keyboard I'm using right now was a Craig's List "freebie."

Daniel B. Martin
 
1 members found this post helpful.
Old 01-17-2013, 10:57 AM   #5
maniakk
LQ Newbie
 
Registered: Jul 2012
Location: hampton, georgia, USA
Distribution: Fedora 17
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thumbs down

Quote:
Originally Posted by danielbmartin View Post
Idea #1) Google linux remap keys
You will find advice including this:
http://forums.linuxmint.com/viewtopic.php?f=90&t=108803
I'm not endorsing any particular method since I haven't tried them.

Idea #2) Replace your keyboard. Your LQ profile doesn't give your location. In my part of the world used keyboards are giveaway items. In fact, the Microsoft ergonomic keyboard I'm using right now was a Craig's List "freebie."

Daniel B. Martin
Dont you think I searched that already before posting a new thread? I want to know which file to edit and what part. I was attempting to do this before, but I gave up on the account that there were too many files in that directory to know which layout I was using. And too I wasnt clear on what part of the file to edit and how.
 
Old 01-17-2013, 11:46 AM   #6
maniakk
LQ Newbie
 
Registered: Jul 2012
Location: hampton, georgia, USA
Distribution: Fedora 17
Posts: 16

Original Poster
Rep: Reputation: Disabled
I saw sometin on te link you posted. XMODMAP? ow do I use it? Is tere a rapical UI for it?
 
Old 01-17-2013, 07:54 PM   #7
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Google xmodmap. It will allow you to remap keys using the X server (only). Here's a sample that swaps the CapsLock and Left Control keys to get you started.
Code:
#! /bin/sh

xmodmap -e 'remove Control = Control_L'
xmodmap -e 'remove Lock = Control_L'
xmodmap -e 'remove Control = Caps_Lock'
xmodmap -e 'remove Lock = Caps_Lock'

if [ $# -eq 0 -o "$1" = "ON" ]; then
        xmodmap -e 'add Lock = Control_L'
        xmodmap -e 'add Control = Caps_Lock'
else
        xmodmap -e 'add Control = Control_L'
        xmodmap -e 'add Lock = Caps_Lock'
fi
--- rod
 
Old 01-20-2013, 02:52 PM   #8
maniakk
LQ Newbie
 
Registered: Jul 2012
Location: hampton, georgia, USA
Distribution: Fedora 17
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thanks for all your help.
Xmodmap did the trick.
I used this script and ran it with xmodmap:
Code:
keycode 119 = BackSpace BackSpace BackSpace BackSpace NoSymbol NoSymbol Terminate_Server

keycode 81 = g G g G

keycode 79 = h H h H
 
  


Reply

Tags
fedora 17, keyboards


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Keyboard keys messed up on Logitech Illuminated Keyboard MikeyCarter Linux - Hardware 2 03-16-2010 09:25 AM
How to set keys of the keyboard Dbajaj Linux - Newbie 4 12-30-2009 12:11 AM
USB keyboard function keys/numeric keys on boot raypen Linux - Hardware 4 04-17-2008 04:07 PM
Assigning keyboard shortcuts to keyboard keys the who Linux - Hardware 3 02-20-2004 10:36 PM
Keyboard Shortcut Keys Odd_Bloke Linux - Newbie 2 08-26-2003 10:44 PM


All times are GMT -5. The time now is 09:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration