Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to submit an extended function key (like F17 or F17 ) to a program that runs in the terminal (I use the default gnome-terminal but could use another if it works there).

Is there a way in Ubuntu 11.04 to generate those key hits? I'm searching for something like Shift+F7 to generate F17 (what I currently use in Reflection under Windows).

My keyboard is set to generic 105 keys PC with the US Qwerty layout.

share|improve this question

xmodmap may be the program to look into here, though it looks like it will take some fiddling. There is some discussion about using xmodmap to simulate a super/fn key and generate F13-20 keycodes here. You need to find they keycodes currently used for Shift-F7 using the technique in that link, then remap them in your ~/.Xmodmap file. So for example if your Shift-F7 keycode was 320 your ~/.Xmodmap would look like:

keycode 320 = F17
keycode 321 = F18

A couple of the comments here look pretty useful for this.

share|improve this answer
Thanks for the answer, I'll take a look at it soon (i.e. not marking it as the accepted answer yet). – Emilien Aug 24 '11 at 11:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.