You are not logged in.

#1 2009-03-19 11:16:38

orjanp
Member
From: Tromsoe, Norway
Registered: 2004-07-03
Posts: 347

Make vim recognize XF86 keyboard symbols.

I would like to have vim to recognize a couple of XF86 keyboard symbols. Is it possible?

I have a Thinkpad T400 with a forward and back button just above the arrow buttons. They are mapped to XF86Forward and XF86Back.

Is it possible to map them to :bn and :bp in vim? Or is it possible to use the keycode directly?

This is my current vimrc mapping.

imap <M-Left> <Esc>:bn<CR>i
imap <M-Right> <Esc>:bp<CR>i
map <M-Left> :bn<CR>
map <M-Right> :bp<CR>

And I'm using xbindkeys and xdotool to map XF86Forward to alt+Right

From .xbindkeysrc

"xdotool key alt+Left"
XF86Back

"xdotool key alt+Right"
XF86Forward

It doesn't work very well. For some reason it just works if I tap very brief on the button, but not when I press it all the way down. XHKeys worked better than xbindkeys for this since it can map a keycode to another keycode and don't have to use xdotool. But it isn't available in x86_64.

Last edited by orjanp (2009-03-19 11:20:43)


Ørjan Pettersen

Offline

Board footer

Powered by FluxBB