LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 10-29-2015, 06:27 AM   #1
haemogoblin
Member
 
Registered: Oct 2015
Location: In a house
Distribution: Raspbian, Xubuntu, Ubuntu
Posts: 34

Rep: Reputation: Disabled
How can I map F11 and F12 to Ctrl+F9, Ctrl+F10?


Hi guys & gurls


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.
 
Old 10-30-2015, 02:36 AM   #2
qlue
Member
 
Registered: Aug 2009
Location: Umzinto, South Africa
Distribution: Crunchbangified Debian 8 (Jessie)
Posts: 747
Blog Entries: 1

Rep: Reputation: 172Reputation: 172
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.)
 
Old 10-30-2015, 08:42 AM   #3
haemogoblin
Member
 
Registered: Oct 2015
Location: In a house
Distribution: Raspbian, Xubuntu, Ubuntu
Posts: 34

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-30-2015, 08:48 AM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
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
Edit: This is for X only.

Last edited by Emerson; 10-30-2015 at 08:50 AM.
 
Old 10-30-2015, 10:48 AM   #5
haemogoblin
Member
 
Registered: Oct 2015
Location: In a house
Distribution: Raspbian, Xubuntu, Ubuntu
Posts: 34

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-30-2015, 10:51 AM   #6
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Mode_switch is the key you hold down. In my case it is Left Windows Key.
 
1 members found this post helpful.
Old 10-30-2015, 12:22 PM   #7
haemogoblin
Member
 
Registered: Oct 2015
Location: In a house
Distribution: Raspbian, Xubuntu, Ubuntu
Posts: 34

Original Poster
Rep: Reputation: Disabled
Ahhh! (he says with the light bulb above it head)

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?
 
Old 10-30-2015, 12:50 PM   #8
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
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.
 
Old 10-30-2015, 01:02 PM   #9
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
There are four columns in my .xmodmaprc.
Code:
keycode  38 = a A adiaeresis Adiaeresis
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.
 
  


Reply



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
Sending CTRL-F12 over PuTTY gregorian Linux - Software 0 05-27-2012 04:39 AM
How to disable Ctrl+C, Ctrl+V, Ctrl+X in rdesktop? Aswathy Linux - Newbie 1 01-19-2011 06:22 PM
[SOLVED] vim:ctrl+v command to select some data.But when I push ctrl+v.It doesn't work.. e3399 Linux - Newbie 20 12-07-2010 06:21 AM
Recognizing ctrl+c,ctrl+l,ctrl+d in C programs leonardo6023 Programming 1 08-19-2009 09:23 AM
VIM - How to map Ctrl-F5? BiThian Linux - General 6 10-26-2006 04:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:14 PM.

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
Open Source Consulting | Domain Registration