Kubuntu: Function key mappings

From FVue
Jump to: navigation, search

Problem

After installing Vdebug for Vim, function keys F2 (debugger.step_over) and F5 (debugger.run) aren't working.

Environment

  • Kubuntu-14.04
  • Konsole-2.8.5

Solution 1. Set key bindings to Default (XFree 4) instead of Linux console

Function keys F1-F5 were not responding, because I had { Settings | Configure Current Profile | Input | Key Bindings } set to "Linux console". This made F5 perform the Vim "E" command, i.e. forward the cursor to the end of word. Setting the Key Bindings to "Default (XFree 4)" fixed this.

Solution 2. Remove .Xmodmap file

Within the { Konsole | Settings | Configure Current Profile | Input | Edit | Test Area | Input } I could see pressing F2 showed no output, while the other function keys all did show output.

It appeared I had a .Xmodmap file laying around, containing this command:

keycode 68 = XF86LaunchA

With the xev utility, I could see that keycode 68 belongs to the F2 key, so I had effectively remapped F2 from XF86_Switch_VT_2 to XF86LaunchA. Removing this file made F2 work again.

See also

Bug 729375 – F1 through F5 keys don't work
Bugreport describing the different key mappings of F1-F5 compared to F6-F12 with the "Linux console" key bindings:

"Looking at the bindings for F1 - F5 under "Linux console" I see them mapped thus:

  • F1: \E[[A
  • F2: \E[[B
  • F3: \E[[C
  • F4: \E[[D
  • F5: \E[[E

But F6 and beyond are mapped

  • F6: \E[17~
  • F7: \E[18~
  • F8: \E[19~

etc..."

http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work
Explanation how to use Xmodmap to make special keys work
XKeyCaps
Graphical front-end to xmodmap