Linux - NewbieThis 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
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This is my first post here on LQ and I really am hoping that some boffin can help me out of the pickle I appear to be in.
I've built a Raspberry PI2 in to an Amiga A600 case and using a Keyrah, I was able to use the Amiga's keyboard as a USB device. It all works pretty darn well, apart from the fact that the Amiga has no F11 or F12. The keyrah does have a switch that you can flick to access the right hand side of the keyboard. But this isn't much good if your using keys on the left for something. So I was wondering if I can modify the keymap and tell Linux from the get go, that F11 and F12 have become Ctrl+F9 and Ctrl+F10.
I've spent the last few days trying my best to make sense of how to do this, but a lot of it is Greek to me and I would truly appreciate the advice, guidance, hand holding of a superior authority on Linux.
It may depend somewhat on which ARM distro you're using.
However, this post should provide a solution for you.
I suggest you read that post through a few times to understand what they're doing and then work out what needs to be done differently to apply it to your case. (at least, that's what I'd do.)
At the moment the Pi is running the latest version of Raspbian, which is an based on Debian.
II had a glance at the link and i'm not sure if this will do what I'm after, as this is swapping keys. Where as I want to map key combinations using the Ctrl+F9 and F10 keys, so that they register as F11 and F12. The guide doesn't seem to mention whether this is possible.
Below is how I added some characters to my US keyboard. Similar setup should work for you.
Code:
~ $ cat .xmodmaprc
keycode 133 = Mode_switch
keycode 13 = 4 dollar 4 cent
keycode 26 = e E EuroSign cent
keycode 30 = u U udiaeresis Udiaeresis
keycode 32 = o O odiaeresis Odiaeresis
keycode 38 = a A adiaeresis Adiaeresis
keycode 40 = d D degree
keycode 58 = m M Greek_mu
Thanks for posting this, could I trouble you to talk me through what you posted? I recognize the keycodes. However what I'm trying to do, is assign two missing keys so that they can be accessed via CTRL+F9 OR CTRL+F10. How would that translate in to the code you posted there? As that looks to me like your assigning the function to singular keys, not a key combination.
Last edited by haemogoblin; 10-30-2015 at 10:49 AM.
So let me see if I understand you, because mode switch is the first on the list. You've told Linux that everything that comes after is a combination of Keycode 133 + another key.
So If I supplemented keycode 133 with the keycode for Ctrl then followed below by the keycodes for F9 and F10, it should 'in theory' recognize it as those keys? Would I be right in thinking these alterations will be lost as soon as I reboot?
When X starts it is supposed to parse ~/.xmodmaprc. In case it does not you can add xmodmap to your X startup somewhere, there is more than one option.
First - a - this is what you get when you hit a
Second - A - same with Shift key
Third - ä - a with modeshift key
Fourth - Ä - a with modeshift key and Shift key
You can see your keymap in effect with xmodmap -pke.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.