最近看到 rust 工具 kanata 推荐,感觉有点意思,方便特殊输入 https://github.com/jtroo/kanata?tab=readme-ov-file

尝试了下键盘和文字宏都成功了,但是鼠标没成功,想把侧键点击映射成鼠标中键 试了 mftp: tap forward mouse button ,mbtp: tap bacward mouse button ,mbck ,mfwd 都不行。

(defcfg
  #|
  This configuration will process all keys pressed inside of kanata, even if
  they are not mapped in defsrc. This is so that certain actions can activate
  at the right time for certain input sequences. By default, unmapped keys are
  not processed through kanata due to a Windows issue related to AltGr. If you
  use AltGr in your keyboard, you will likely want to follow the simple.kbd
  file while unmapping lctl and ralt from defsrc.
  |#
  process-unmapped-keys yes
)

(defsrc
  caps grv     q    w  e	[	]	Backspace
                     a   s    d
  lsft 									.	rsft                       
                                        ralt  apps 	rctl
  🖰4  
)

(deflayer default
  @cap   (unicode "`")        _     _   _	_	_	_
                       _    _    _
  _  											_	  _
                                             @ralt  VolumeDown   VolumeUp
  🖰3 
)

(deflayer ralt
  _    (unicode "`")    home   up  end		VolumeDown	VolumeUp	Delete
              left down rght
  _   									(unicode ">")	  _
                                          _		_   _
  _ 
)

(defalias
  cap (tap-hold-press 200 200 (unicode ">")  (layer-toggle ralt))
  ralt (tap-hold-press 200 200 grv (layer-toggle ralt))
)
举报· 115 次点击
登录 注册 站外分享
快来抢沙发
0 条回复  
返回顶部