Ohmyzsh: Num Pad can't input

Created on 14 Mar 2016  ·  3Comments  ·  Source: ohmyzsh/ohmyzsh

I'm using Mac + ZSH for developer and Gentoo + ZSH for server.
Both of those my Keyboard's num-pad can't input any char(1,2,3,4,5,6,7,8,9,0,.,=,/,*,-,+,enter)
But when I change to bash, those keys are OK.
In any other Applicatons, those keys are OK too.

I'm using Razer's BlackWidow keyboard.

Bug bindkey

Most helpful comment

I tend to add this to my ~/.zshrc file:

# Keypad
# 0 . Enter
bindkey -s "^[Op" "0"
bindkey -s "^[On" "."
bindkey -s "^[OM" "^M"
# 1 2 3
bindkey -s "^[Oq" "1"
bindkey -s "^[Or" "2"
bindkey -s "^[Os" "3"
# 4 5 6
bindkey -s "^[Ot" "4"
bindkey -s "^[Ou" "5"
bindkey -s "^[Ov" "6"
# 7 8 9
bindkey -s "^[Ow" "7"
bindkey -s "^[Ox" "8"
bindkey -s "^[Oy" "9"
# + -  * / =
bindkey -s "^[Ok" "+"
bindkey -s "^[Om" "-"
bindkey -s "^[Oj" "*"
bindkey -s "^[Oo" "/"
bindkey -s "^[OX" "="

Manual: https://www.gnu.org/software/screen/manual/html_node/Key-Binding.html#Key-Binding
Source: http://superuser.com/questions/742171/zsh-z-shell-numpad-numlock-doesnt-work

All 3 comments

I tend to add this to my ~/.zshrc file:

# Keypad
# 0 . Enter
bindkey -s "^[Op" "0"
bindkey -s "^[On" "."
bindkey -s "^[OM" "^M"
# 1 2 3
bindkey -s "^[Oq" "1"
bindkey -s "^[Or" "2"
bindkey -s "^[Os" "3"
# 4 5 6
bindkey -s "^[Ot" "4"
bindkey -s "^[Ou" "5"
bindkey -s "^[Ov" "6"
# 7 8 9
bindkey -s "^[Ow" "7"
bindkey -s "^[Ox" "8"
bindkey -s "^[Oy" "9"
# + -  * / =
bindkey -s "^[Ok" "+"
bindkey -s "^[Om" "-"
bindkey -s "^[Oj" "*"
bindkey -s "^[Oo" "/"
bindkey -s "^[OX" "="

Manual: https://www.gnu.org/software/screen/manual/html_node/Key-Binding.html#Key-Binding
Source: http://superuser.com/questions/742171/zsh-z-shell-numpad-numlock-doesnt-work

bindkey works nicely, but it would be nice to see it work natively.

Looks like the same thing as #2654. It's due to the whole smkx/rmkx thing, which you can read about in #2735.

5113 should fix it and make it work "natively".

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thienedits picture thienedits  ·  3Comments

jaredmoody picture jaredmoody  ·  3Comments

faxotherapy picture faxotherapy  ·  3Comments

Cabbagec picture Cabbagec  ·  3Comments

TadorHead picture TadorHead  ·  3Comments