v2Next
V2EX  ›  问与答

请教一个 HammerSpoon 切换输入法的问题?

  •  
  •   v2Next · Jan 21, 2017 · 2801 views
    This topic created in 3399 days ago, the information mentioned may be changed or developed.

    之前是用 Karabiner 来设置的切换输入法(「 right shift 」 代替 「 Command+Space 」),后来升级 Sierra 不能用了。之后在微博上看到 HammerSpoon 这个工具,问下 V 友,如何 lua 实现 right shift 替代 Command + Space 呢?


    hs.hotkey.bind({"cmd", "right_shift"}, "W", function()
      hs.alert.show("Hello World!")
    end)
    

    自己试着在里面操作 右 shift,发现 无论是 (right shift, right-shift, rifht_shift, shift right, shift-right, shift_right) 左 shift 依旧有效。

    2 replies    2019-09-29 10:51:35 +08:00
    bao3
        1
    bao3  
       Jan 22, 2017
    帮你顶一下,我也不会
    cai314494687
        2
    cai314494687  
       Sep 29, 2019
    只有 shift 没有 right_shift 吧

    你可以看这个文档 http://www.hammerspoon.org/docs/hs.hotkey.html
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3017 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 15:19 · PVG 23:19 · LAX 08:19 · JFK 11:19
    ♥ Do have faith in what you're doing.