V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Showfom
26.39D
2.05D
V2EX  ›  macOS

如何让 OS X 里的软件支持全键盘的小键盘数字键?

  •  
  •   Showfom ·
    PRO
    · Dec 4, 2014 · 5147 views
    This topic created in 4176 days ago, the information mentioned may be changed or developed.
    发现只有一些 OS X 的软件才支持,很多都不支持,比如终端就不支持小键盘数字键,PD10 虚拟机里也不支持,有什么方法让不支持小键盘数字键的软件也支持呢?
    7 replies    2014-12-13 19:19:23 +08:00
    evillions
        1
    evillions  
       Dec 4, 2014
    都支持吧,我外接键盘有小键盘,目前没遇到不支持的app,终端刚才验证了下,支持的
    wgxdz
        2
    wgxdz  
       Dec 4, 2014
    是不是Num Lock打开了? 或者什么地方禁用了?
    Showfom
        3
    Showfom  
    OP
    PRO
       Dec 4, 2014
    @wgxdz 没有禁用啊

    @evillions 我用的是 homebrew ,然后数字输入不了,直接默认的终端没问题。
    yyfearth
        4
    yyfearth  
       Dec 4, 2014
    @Showfom bash 是没问题的
    zsh默认不映射小键盘 需要自己设置映射
    https://github.com/robbyrussell/oh-my-zsh/issues/2654
    Showfom
        5
    Showfom  
    OP
    PRO
       Dec 4, 2014 via iPhone
    @yyfearth 谢谢
    Showfom
        6
    Showfom  
    OP
    PRO
       Dec 8, 2014
    已经解决,在 ~/.zshrc 加入

    # Fix numeric 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 "^[Ol" "+"
    bindkey -s "^[Om" "-"
    bindkey -s "^[Oj" "*"
    bindkey -s "^[Oo" "/"
    aksoft
        7
    aksoft  
       Dec 13, 2014
    @Showfom 加号不对,或者对别的键盘不符合
    bindkey -s "^[Ok" "+"
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1377 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 75ms · UTC 17:10 · PVG 01:10 · LAX 10:10 · JFK 13:10
    ♥ Do have faith in what you're doing.