Thanks mate. I searched a lot about remmaping keys on linux to make AltGr, Menu, R_CTRL and L_Shift work as the arrow keys but I only had found overly complicated ways to do this simple thing, which I tried but couldn't make it work because I'm a beginner at Linux as a whole. You just saved me some money, I was about to throw my new keyboard and grab a new one with dedicated arrow keys just because of that. [Worked on ZorinOS 16]
Tom thank you so so so so much. I've been trying to do this for two weeks. I found all sorts of complicated tutorials that didn't work. I have laptop with some keys which went dead and I just needed to use F1 --- F 10 keys to replace them. Your method worked perfectly and seamlessly. Thank you again!!!
Man, thanks for your help. I used to disable my "End" in Windows using KeyTweak program but i recently installed Ubuntu in my pc and i didn't know how to disable a key. As you probably know, it's impossible to do things, specially browsing, with "End" key pressed. I read lots of tutorials but yours was the one that most helped me.
You are so welcome and your feedback gives me so much encouragement to keep learning and sharing. Also very glad to have you over into the Linux Community. It is the greatest.
@@sleepyeyesvince well, I've watched a lot of UA-cam videos about it and yes, it is possible, but I have to use the solder for that. It could be an option if more keys fail in the future, but for the moment I'm fine with that. I'm afraid to break the keyboard and mess it all up hahaha
It works great! Turns out I have a Asus S451LA and it has the VIVO key, which is useless in my Ubuntu Histrute. Aldought i did map it with the F13 key, and now I use it to toggle Guake. Thank you very much.
I believe this does not work anymore. In fact, xmodmap has been deprecated for quite a while now (before the video was originally posted). We need to use the newer xkb. For me using xmodmap randomly resetted my settings in between sessions.
This video gave me a clue to remap keys on linux. Great. But I am just starting to use Linux mint recently. I use Windows 11 before. I am still facing the problem which are: I always remap [insert] and [prt sc] as [up] and [down] arrows with microsoft powertoys. Now up works fine but down[prt sc] drags the text line down a line which is not intended and I want simply down the cursor a line. And [caps_lock] to [Escape] works but [caps_lock] action is still bundled with [escape] action. The only thing working flawlessly is [context_menu] to [Super_R]. Thanks.
Neat.. But my laptop lacks proper HOME and END keys. These keys are only available when I disable numpad. I want FN+7 as HOME and FN+9 as END how to do that? How to make key combinations work in .Xmodmap? I see FN is not recognised as a keycode. I can use CTRL instead, but how to do key combinations?
If you're using Linux mint, you can create a custom keyboard shortcut for that. Open gnome-terminal, type without quotes " read" press enter. Now press only the home button after you have disabled you numpad. Now make a note of exactly what the results are. Do the same.peocess again but ensure the numpad is enabled. Are the results the same? if they are not..my idea should work for you. You'll enter that result you get from that terminal command as the command in the command window part when you select " custom shortcut". Then for the keyboard shortcut combo do Fn+7. You could also do Shift+numpad 7 I think. 🤔.
From what I understand, the Fn+? key combination is an internal function that is specific to keyboard model to call up special tasks like your multimedia keys. Unfortunately they do not appear to be re-mappable that I am aware of.
@@sleepyeyesvince thanks Ive being using other ways to type the things that are not on the keyboard, is kind of hassle but the best I`ve could come up with, hope someday someone find a way to do that easily
if anyone sees, im on ubuntu, and trying to do this, when i run the original command it tells me ive swapped my key, but caps lock is still caps lock. anyone know how to fix this?
I wrote this to disable my PageDown key and change PageUp to Down arrow. But I can't do it. I tried to find the.Xmodmap file but I cant find it in Home keycode 117= keycode 112= Down
I wonder if that sounds like an error in the syntax somewhere in your .Xmodmap file. As reference, my one has as it's contents: keysym Menu = Super_R !keycode 135 = Super_R (Note the "!" is how you comment out a line)
What do you write in nano when a key has two options (1: primary 2: shift option)? My laptop has the same number for both for example: ‘20 minus’ ‘20 underscore’. I want to change the underscore to dollar. But writing this in nano would change minus to dollar: Keycode 20 = dollar Some help would be greatly appreciated. Thanks
On my system, it seems to apply automatically each time I login if using xorg. Otherwise, a solution could be placing it into a startup script or into your ~/.profile for example.
Please help. Buddy can you tell me the keysym for Fn key , I am unable to find it. Similar to point no. 3 in description, I need a code to change my super_L to fn key.
Sorry, I don't thing this mod will work for a Fn key. Your keyboard's Fn key is specific only to your model of keyboard to allow it to access extra functions. As such, by itself, the Fn key does not send any input data to your computer.
That one person who actually does use the menu key rather frequently. Let me explain myself. It's actually just that same instinct that makes one deliberately go for programs that, say, support Vim-stule motions and such; just the same way, if I have a context menu button neatly under my pinky, why would I even bother reaching out for my mouse,?
I converted my Chromebook to a Linux machine so I want to remap some of these Chromebook functions to regular functions and I can only do a few because a few are automatically listed in The keyboard shortcut setup place but I want to change a couple that are not listed and I don't know how to do those. For example on a Chromebook above the shift key where normal keyboards are caps lock they have a little magnifying glass and it's either a search key or opens a menu box but I want to make it a normal caps lock button and I don't know how to do that. I also do not have a delete key and I want to make something be a delete key and I don't know how to do that either. So I found this video and I'm going to check it out but I don't have access to the internet right now to follow. But I'm going to come back to this and check it out when I get home. Hopefully I can make it work!
Good man..I appreciate your video BUT... PLEASE... ZOOM in.. on a phone or tablet.its very difficult to read what you're typing or pasting...even on a 1440 phone
Thanks mate. I searched a lot about remmaping keys on linux to make AltGr, Menu, R_CTRL and L_Shift work as the arrow keys but I only had found overly complicated ways to do this simple thing, which I tried but couldn't make it work because I'm a beginner at Linux as a whole.
You just saved me some money, I was about to throw my new keyboard and grab a new one with dedicated arrow keys just because of that.
[Worked on ZorinOS 16]
Tom thank you so so so so much. I've been trying to do this for two weeks. I found all sorts of complicated tutorials that didn't work. I have laptop with some keys which went dead and I just needed to use F1 --- F 10 keys to replace them. Your method worked perfectly and seamlessly. Thank you again!!!
That's awesome :)
Man, thanks for your help. I used to disable my "End" in Windows using KeyTweak program but i recently installed Ubuntu in my pc and i didn't know how to disable a key. As you probably know, it's impossible to do things, specially browsing, with "End" key pressed. I read lots of tutorials but yours was the one that most helped me.
You are so welcome and your feedback gives me so much encouragement to keep learning and sharing. Also very glad to have you over into the Linux Community. It is the greatest.
These tips works with Raspberry pi Os, thank you so much for sharing it Sir.
Glad it helped
Thank you so so much mate!
I was desperately seeking for this solution but couldn't find any useful tutorial.
But now it works perfectly!🤝
THANK U SO SO SO SO MUCH SUCH LIFE SAVER , i've read a lot of docs tutorial but hardly understand any , luckily i found ur easy to grasp tutorial
Thank you for the explanation! My mechanical keyboard is starting to fail and this is so handy while trying to fix it!
Glad it helped! Is there a way you can replace the switch that's failing on your keyboard?
@@sleepyeyesvince well, I've watched a lot of UA-cam videos about it and yes, it is possible, but I have to use the solder for that. It could be an option if more keys fail in the future, but for the moment I'm fine with that. I'm afraid to break the keyboard and mess it all up hahaha
I pretty sure I will be able to follow your video
So thank you for making tutorials !!
finally a reasonable soultion for key mapping
I'm very grateful for your help! I was thinking about getting a new pc but with this resource I can keep it, thank you so much!
1:25 to 1:40 read command also works
Type it. Press enter. THEN press the key you're wanting to see the result of,
The thing is, I need to replace a combination of two letters, so that when I press thrid level, and one letter, it's printing another character
It works great! Turns out I have a Asus S451LA and it has the VIVO key, which is useless in my Ubuntu Histrute. Aldought i did map it with the F13 key, and now I use it to toggle Guake. Thank you very much.
Glad it helped
use xmodmap for this!
xmodmap -e "keycode 151=less"
that's an example of how you can do it in 1 command
Lifesaver. Thank you!
That’s useful for trying out things. But it won’t persist between different X11 sessions.
@@roymath I think you could put it in your xinitrc file and make it permanent
I'm currently configuring minimal Arch and this helped me a lot. Thanks c:
Glad to hear!
Would it be possible using this method to program the Super key to do two key commands? Example, Alt R
Thanks
I believe this does not work anymore. In fact, xmodmap has been deprecated for quite a while now (before the video was originally posted). We need to use the newer xkb.
For me using xmodmap randomly resetted my settings in between sessions.
It still works. I just used it to disable my caps_lock key because it was clicking by itself
As far as im aware xmodmap isn't deprecated and you have to make it autolaunch in your .bashrc or something else for it to stay consistent
Thank you so much I really thought that I have to go through some badass config. But you explained it i literally seconds. good job!!
gracias amigo, despues de dos dias de investigar al fin encontre la solucion.... thanks
works on AntiX to replace the Enter key as the Acer R7 571 keyboard stops working over time.. thanks!
thanks a lot for this thorough guide!
Thank you for the easy to follow tutorial!
hello is there any tutorial to disable specific keyboard keys using xmodmap ?
This video gave me a clue to remap keys on linux. Great. But I am just starting to use Linux mint recently. I use Windows 11 before. I am still facing the problem which are: I always remap [insert] and [prt sc] as [up] and [down] arrows with microsoft powertoys. Now up works fine but down[prt sc] drags the text line down a line which is not intended and I want simply down the cursor a line. And [caps_lock] to [Escape] works but [caps_lock] action is still bundled with [escape] action. The only thing working flawlessly is [context_menu] to [Super_R]. Thanks.
wondering if the file has to be '.xmodmap' or u can put anything before the dot
Very nice tutorial. Thank you !!!
Another great video Vince!
Glad you enjoyed it!
wow this was easy thanks a lot!
Is there any way to map an HP omen laptop and his macro keys ?
Neat.. But my laptop lacks proper HOME and END keys. These keys are only available when I disable numpad. I want FN+7 as HOME and FN+9 as END how to do that? How to make key combinations work in .Xmodmap? I see FN is not recognised as a keycode. I can use CTRL instead, but how to do key combinations?
If you're using Linux mint, you can create a custom keyboard shortcut for that.
Open gnome-terminal, type without quotes " read" press enter.
Now press only the home button after you have disabled you numpad.
Now make a note of exactly what the results are.
Do the same.peocess again but ensure the numpad is enabled.
Are the results the same?
if they are not..my idea should work for you.
You'll enter that result you get from that terminal command as the command in the command window part when you select " custom shortcut". Then for the keyboard shortcut combo do Fn+7.
You could also do Shift+numpad 7 I think. 🤔.
I really liked your video, but suppose that I wanted to change some combination of keys lik fn + ' for another letter or symbol is that possible ?
From what I understand, the Fn+? key combination is an internal function that is specific to keyboard model to call up special tasks like your multimedia keys. Unfortunately they do not appear to be re-mappable that I am aware of.
@@sleepyeyesvince thanks Ive being using other ways to type the things that are not on the keyboard, is kind of hassle but the best I`ve could come up with, hope someday someone find a way to do that easily
help me.
i want to change this key to this
z to [
x to ]
b to \
how can I do this?
if anyone sees, im on ubuntu, and trying to do this, when i run the original command it tells me ive swapped my key, but caps lock is still caps lock. anyone know how to fix this?
SIR, HOW CAN I REGISTER '#' SYMBOL WHEN THE 3 KEY IS NOT WORKING?
Can a single key be re-mapped to two keys for example, key '1' to be re-mapped to a combination of 'SHIFT+F12' ?
did you ever make it happen
@@maraqueros-x7e Sadly not :(
@@maraqueros-x7e i am looking for the same man, lemme know if you found any solutions to it, thanks
Hello, is there a way to identify the keysym of a key that isn't working ? Please help.
just google it, geez!
I tried with esc key and didn't work 😅
This helped me tons 😇
I wrote this to disable my PageDown key and change PageUp to Down arrow. But I can't do it. I tried to find the.Xmodmap file but I cant find it in Home
keycode 117=
keycode 112= Down
I think you just need to make your own .Xmodmap file in Home, that's what I did
Got this Error;
xmodmap: unable to open file './Xmodmap' for reading
xmodmap: 1 error encountered, aborting.
I wonder if that sounds like an error in the syntax somewhere in your .Xmodmap file. As reference, my one has as it's contents:
keysym Menu = Super_R
!keycode 135 = Super_R
(Note the "!" is how you comment out a line)
I also had this error,
Try adding xmodmap ./.Xmodmap just to be sure.
type this command in terminal instead
*xmodmap ~/.Xmodmap*
I get this too:
xmodmap: unknown command on line /home/user/.Xmodmap:1
xmodmap: 1 error encountered, aborting.
just type this instead:
xmodmap .Xmodmap
thanks, brother, you solved my biggest issue
You're very welcome :)
Thanks, just one thing It doesn’t work after reboot, need to run xmodmap .Xmodmap again. Any solution?
x2
I'd suggest perhaps adding xmodmap .Xmodmap to your ~/.xsession file or however your DE runs startup scripts?
@@sleepyeyesvince how can we do that please?
Thank you so much!!! You're a life saver!!!
For linux mint, if it doesn't work, type this command after creating the file
*xmodmap ~/.Xmodmap*
Great tip! Thanks.
Thank you very much! Now I can basically used my keyboard hahaha
Very helpful !
What do you write in nano when a key has two options (1: primary 2: shift option)? My laptop has the same number for both for example: ‘20 minus’ ‘20 underscore’. I want to change the underscore to dollar. But writing this in nano would change minus to dollar:
Keycode 20 = dollar
Some help would be greatly appreciated. Thanks
I don't think you can do that. When you remap a key, it will remap all the functions of that key, turning it completely into another.
does ubuntu use xmodmap
Thank you very much 👍
Thank you, it worked
Nice one mate, :)
Thanks 😁
How can I make this change permanent? I get it successfully only if type xmodmap .Xmodmap on terminal. Thanks!
On my system, it seems to apply automatically each time I login if using xorg. Otherwise, a solution could be placing it into a startup script or into your ~/.profile for example.
Thank you so much sir
what if i want to map a combination, say ctrl+alt -> alt gr?
I don't think this would work for key combinations unless the particular combination outputs a specific keycode. Good luck!
thx man
very useful
Please help. Buddy can you tell me the keysym for Fn key , I am unable to find it.
Similar to point no. 3 in description, I need a code to change my super_L to fn key.
Sorry, I don't thing this mod will work for a Fn key. Your keyboard's Fn key is specific only to your model of keyboard to allow it to access extra functions. As such, by itself, the Fn key does not send any input data to your computer.
not simbol ?
Hi I want ctrl + alt + left arrow for Home and right for End pls help on same
Sorry, I don't think this method works for key combinations :(
how do we undo that key mapping tho
Simply delete your .Xmodmap file from your home directory.
Thanks man
Thanks for watching and taking the time to leave a comment.
you are a god
That one person who actually does use the menu key rather frequently. Let me explain myself. It's actually just that same instinct that makes one deliberately go for programs that, say, support Vim-stule motions and such; just the same way, if I have a context menu button neatly under my pinky, why would I even bother reaching out for my mouse,?
Thanks bro
doesnt work with alt :(
you may need to specify ALT_L or ALT_R
Thanks!!
thank you so much
You're welcome!
thanks a lot
For me doesent work on reboot
Same
I converted my Chromebook to a Linux machine so I want to remap some of these Chromebook functions to regular functions and I can only do a few because a few are automatically listed in The keyboard shortcut setup place but I want to change a couple that are not listed and I don't know how to do those. For example on a Chromebook above the shift key where normal keyboards are caps lock they have a little magnifying glass and it's either a search key or opens a menu box but I want to make it a normal caps lock button and I don't know how to do that. I also do not have a delete key and I want to make something be a delete key and I don't know how to do that either. So I found this video and I'm going to check it out but I don't have access to the internet right now to follow. But I'm going to come back to this and check it out when I get home. Hopefully I can make it work!
I get an error.
Could you provide more details?
Simple! :)
Indeed!
thnx
Good man..I appreciate your video BUT... PLEASE... ZOOM in.. on a phone or tablet.its very difficult to read what you're typing or pasting...even on a 1440 phone
It’s remapping
thank you so much