LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   UBUNTU: Change Keyboard Mapping (https://www.linuxquestions.org/questions/linux-newbie-8/ubuntu-change-keyboard-mapping-841752/)

soccer12_88 11-01-2010 03:25 PM

UBUNTU: Change Keyboard Mapping
 
I want to change my right alt key to perform a spacebar function.

how do I do this?

Thank you.

Samotnik 11-01-2010 05:55 PM

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.

soccer12_88 11-01-2010 08:26 PM

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


any suggestions?

Amdx2_x64 11-01-2010 08:39 PM

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

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

<Then enter password>

soccer12_88 11-01-2010 09:06 PM

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.

soccer12_88 11-01-2010 09:11 PM

Quote:

Originally Posted by soccer12_88 (Post 4146348)
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.

Amdx2_x64 11-01-2010 09:15 PM

I never tried this before. I am using Debian and just did the same thing you did, didn't work for me either.

Samotnik 11-02-2010 04:16 AM

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 ;-)

soccer12_88 11-02-2010 10:06 AM

Quote:

Originally Posted by Samotnik (Post 4146612)
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?

impert 11-02-2010 10:17 AM

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.

soccer12_88 11-02-2010 05:29 PM

Quote:

Originally Posted by impert (Post 4147028)
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.


All times are GMT -5. The time now is 10:03 AM.