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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-17-2013, 08:40 AM
|
#1
|
|
LQ Newbie
Registered: Jul 2012
Location: hampton, georgia, USA
Distribution: Fedora 17
Posts: 16
Rep: 
|
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.
|
|
|
|
01-17-2013, 09:08 AM
|
#2
|
|
Member
Registered: Apr 2010
Location: Apex, NC, USA
Distribution: Ubuntu
Posts: 777
Rep: 
|
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
|
|
|
|
01-17-2013, 09:21 AM
|
#3
|
|
LQ Newbie
Registered: Jul 2012
Location: hampton, georgia, USA
Distribution: Fedora 17
Posts: 16
Original Poster
Rep: 
|
Quote:
Originally Posted by danielbmartin
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...
|
|
|
|
01-17-2013, 09:46 AM
|
#4
|
|
Member
Registered: Apr 2010
Location: Apex, NC, USA
Distribution: Ubuntu
Posts: 777
Rep: 
|
Quote:
Originally Posted by maniakk
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.
|
01-17-2013, 09:57 AM
|
#5
|
|
LQ Newbie
Registered: Jul 2012
Location: hampton, georgia, USA
Distribution: Fedora 17
Posts: 16
Original Poster
Rep: 
|
Quote:
Originally Posted by danielbmartin
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.
|
|
|
|
01-17-2013, 10:46 AM
|
#6
|
|
LQ Newbie
Registered: Jul 2012
Location: hampton, georgia, USA
Distribution: Fedora 17
Posts: 16
Original Poster
Rep: 
|
I saw sometin on te link you posted. XMODMAP? ow do I use it? Is tere a rapical UI for it?
|
|
|
|
01-17-2013, 06:54 PM
|
#7
|
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,321
|
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
|
|
|
|
01-20-2013, 01:52 PM
|
#8
|
|
LQ Newbie
Registered: Jul 2012
Location: hampton, georgia, USA
Distribution: Fedora 17
Posts: 16
Original Poster
Rep: 
|
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
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:09 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|