LinuxQuestions.org
Visit Jeremy's Blog.
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-13-2004, 07:28 PM   #1
frankie_DJ
Member
 
Registered: Sep 2004
Location: NorCal
Distribution: slackware 10.1 comfy, Solaris10 learning
Posts: 232

Rep: Reputation: 30
Mapping Esc to windows key in Vim


Is it possible to map a windows key in Vim?
I am trying to use the windows key as Esc to change modes in Vim (Esc is to far up) .
I know I should use
Code:
:map <oldkey> <newkey>
but I don't know what is a key code for <windows> key.
When I type
Code:
Ctrl-V <windows>
to see the key code for windows key I don't get anything. But then, I don't get anything for <Ctrl> or <Alt> either so I am confused. Thanks for help.
 
Old 10-13-2004, 11:13 PM   #2
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
I think the key codes are 115 and 116 for the left and right keys respectively, but could be different on some keyboards. You should be able to check with the xev program.
(Whether or not this will work in vim is something I don't know)
 
Old 10-14-2004, 02:56 PM   #3
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 46
if you can't get it, you might consider making the caps lock an escape key. just put this in your ~/.xinitrc:
Code:
# -----------start------------
# Swap caps lock and escape
remove Lock = Caps_Lock
keysym Escape = Caps_Lock
keysym Caps_Lock = Escape
add Lock = Caps_Lock
# ------------end-------------
just make sure caps lock isn't turned off in your xorg.conf. the downside is it only works in X, but for me it's still been useful.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Changing the Meta key from Esc to Alt primo *BSD 0 08-27-2005 05:18 PM
mapping a key to compile a program in vim dvm Linux - Software 1 01-26-2005 07:56 AM
Arrow Key mapping lazlom AIX 5 06-21-2004 03:32 PM
mapping delete key sboyce57 Linux - Newbie 1 02-22-2004 11:05 PM
Damn 'Esc' key crabboy General 1 05-15-2001 10:05 PM


All times are GMT -5. The time now is 12:51 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration