LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-01-2010, 04:25 PM   #1
soccer12_88
LQ Newbie
 
Registered: Nov 2010
Posts: 6

Rep: Reputation: 0
UBUNTU: Change Keyboard Mapping


I want to change my right alt key to perform a spacebar function.

how do I do this?

Thank you.
 
Old 11-01-2010, 06:55 PM   #2
Samotnik
Member
 
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
You should open file /usr/share/X11/xkb/keycodes/xfree86.
Then add a line to the end of the default xkb_keycodes "xfree86" section
Code:
<SPCE> = 113
Save file, and restart xserver.

Last edited by Samotnik; 11-01-2010 at 06:57 PM.
 
Old 11-01-2010, 09:26 PM   #3
soccer12_88
LQ Newbie
 
Registered: Nov 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Thankyou

but when I try to save the file it says 'Permission Denied.'


any suggestions?
 
Old 11-01-2010, 09:39 PM   #4
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Rep: Reputation: 50
You need to edit it as root. Open your terminal and type:

sudo gedit /usr/share/X11/xkb/keycodes/xfree86

<Then enter password>

Last edited by Amdx2_x64; 11-01-2010 at 09:43 PM.
 
Old 11-01-2010, 10:06 PM   #5
soccer12_88
LQ Newbie
 
Registered: Nov 2010
Posts: 6

Original Poster
Rep: Reputation: 0
so i tried everything and even got it to save but it still does not change my RIGHT ALT key to my SPACEBAR function. I restarted my computer to see if the changes would take effect but no dice.

I even deleted the line that said <RALT> = 113 in case it was causing a problem, but again, no dice.
 
Old 11-01-2010, 10:11 PM   #6
soccer12_88
LQ Newbie
 
Registered: Nov 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by soccer12_88 View Post
so i tried everything and even got it to save but it still does not change my RIGHT ALT key to my SPACEBAR function. I restarted my computer to see if the changes would take effect but no dice.

I even deleted the line that said <RALT> = 113 in case it was causing a problem, but again, no dice.
unless there is a difference between restarting my xserver and restarting my computer...if so, I don't know how to restart my xserver.
 
Old 11-01-2010, 10:15 PM   #7
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Rep: Reputation: 50
I never tried this before. I am using Debian and just did the same thing you did, didn't work for me either.
 
Old 11-02-2010, 05:16 AM   #8
Samotnik
Member
 
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
Oh, sorry. It's my fault, there should be semicolon at the end. Like this
Code:
<SPCE> = 113;
And you should guess it by youself — format is pretty clear ;-)
 
Old 11-02-2010, 11:06 AM   #9
soccer12_88
LQ Newbie
 
Registered: Nov 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Samotnik View Post
Oh, sorry. It's my fault, there should be semicolon at the end. Like this
Code:
<SPCE> = 113;
And you should guess it by youself format is pretty clear ;-)

I had guessed that there was a semicolon the first time I tried to modify the file. So it's not the problem. Any ideas?
 
Old 11-02-2010, 11:17 AM   #10
impert
Member
 
Registered: Feb 2009
Posts: 282

Rep: Reputation: 54
Quote:
// It seems that the "default" must be the first entry in the file.

default xkb_keycodes "xfree86" {
include "xfree86(basic)"
<BKSL> = 51;
alias <AC12> = <BKSL>;
<LSGT> = 94;
}
Maybe you should put it in the default section? As an alias? I don't know: these are just suggestions to try.
 
Old 11-02-2010, 06:29 PM   #11
soccer12_88
LQ Newbie
 
Registered: Nov 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by impert View Post
Maybe you should put it in the default section? As an alias? I don't know: these are just suggestions to try.
That didn't work either =/. Thanks for the suggestion though.
 
  


Reply


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
Terminal keyboard mapping - How to make Ubuntu more like Fedora ChantCd Linux - Software 1 09-24-2010 07:46 PM
[SOLVED] How to change key mapping in Ubuntu 9.10 taylorkh Ubuntu 10 01-25-2010 04:06 PM
change keyboard mapping rudy1094 Slackware 2 05-24-2008 11:20 PM
Can't change keyboard layout in Ubuntu 8.04 login screen Anonymous1993 Linux - Newbie 3 04-26-2008 09:31 AM
how to change keyboard mapping for console and X ? scriptKid Linux - General 3 07-20-2007 10:14 PM


All times are GMT -5. The time now is 06:33 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration