Number keypad in vim insert mode [8]
Number keypad in vim insert mode
Friday, January 6, 2012 9:34 AM - slashkick
I'm using the number keypad with num lock on in insert mode in vim. The number keypad inserts letters on a new line. The letters that are inserted are below. When not in insert mode, the number keypad work as expected and enters numbers. Does anyone have a solution to get the number keypad working normally in insert mode?
1=q
2=r
3=s
4=t
Program Ver. : Xshell 4
1=q
2=r
3=s
4=t
Program Ver. : Xshell 4
Re: Number keypad in vim insert mode
Friday, January 6, 2012 11:03 AM - slashkick
I should say that with SecureCRT the keypad functions normally entering numbers in insert mode on the same machine
Re: Number keypad in vim insert mode
Monday, January 9, 2012 7:00 PM - Filipe
This is due to different terminal type setting. You can change the Terminal type in Xshell session properties > Terminal. Set it as ansi and number pad should work in VIM.
Re: Number keypad in vim insert mode
Thursday, January 19, 2012 2:44 PM - slashkick
Filipe - Thank you so much!@!
Exactly correct.
Exactly correct.
Re: Number keypad in vim insert mode
Friday, February 17, 2012 8:50 PM - wuj
When I change to ansi mode, it seems PgUp and PgDn does not work well in the normal mode of vim. It will act as a function to change the current letter to a capital style instead of scroll the screen.
Re: Number keypad in vim insert mode
Tuesday, February 21, 2012 5:47 PM - Daniel
In VIM (or VI), the following keys are used to move between pages:
Ctrl-F - forward one page
Ctrl-B - back one page
Ctrl-F - forward one page
Ctrl-B - back one page
Re: Number keypad in vim insert mode
Monday, December 30, 2013 8:51 AM - Thom Porter
None of the above worked well enough for me. Switching to ANSI meant loosing the functionality of other keys - namely my delete becoming a backspace (no, I didn't have "delete sends backspace" checked - though I tried checking it to see if it would fix it!) Other keys weren't working either, like home/end, etc. So I started playing. Here's what worked best for me in SecureCRT:
Under Terminal -> Emulation:
1) Set Terminal to XTerm (optionally turn on ANSI color, works fine for me.)
2) Make sure alternate keyboard emulation is unchecked.
Under Terminal -> Emulation -> Modes:
1) Make sure "Numeric Keypad" is selected in both sections.
2) Uncheck "Enable keypad mode switching".
Restart SecureCRT and give it a whirl. The only problem you might have is if you turn numlock off, the numpad does strange things (does not operate as arrows.) I don't mind this - I never turn numlock off... Also, if it makes a difference, I'm connecting to my dev machine, running Ubuntu 12 server 99% of the time... I ssh to other servers from there, and the numpad continues to work as expected on other machines I connect to.
-tp
Under Terminal -> Emulation:
1) Set Terminal to XTerm (optionally turn on ANSI color, works fine for me.)
2) Make sure alternate keyboard emulation is unchecked.
Under Terminal -> Emulation -> Modes:
1) Make sure "Numeric Keypad" is selected in both sections.
2) Uncheck "Enable keypad mode switching".
Restart SecureCRT and give it a whirl. The only problem you might have is if you turn numlock off, the numpad does strange things (does not operate as arrows.) I don't mind this - I never turn numlock off... Also, if it makes a difference, I'm connecting to my dev machine, running Ubuntu 12 server 99% of the time... I ssh to other servers from there, and the numpad continues to work as expected on other machines I connect to.
-tp
Re: Number keypad in vim insert mode
Sunday, August 6, 2017 5:46 AM - Ashi
@Thom Porter
Thank a lot. That solved my problem.
Thank a lot. That solved my problem.
Re: Number keypad in vim insert mode
Tuesday, December 4, 2018 9:44 AM - bestann
In xshell:
Terminal→ VT modes:
Initial Numeric Keypad Mode (DECNKM) - Set to normal.
With NumLock - numbers, without NumLock - arrows.
Terminal→ VT modes:
Initial Numeric Keypad Mode (DECNKM) - Set to normal.
With NumLock - numbers, without NumLock - arrows.
Previous views: 824