librime-lua
librime-lua copied to clipboard
key_binder中的toggle怎么用?
在下面的教程中看到了key_binder/bindings:中when ,access, send的用法,但是不知道toggle怎么用,可以举个例子么?
https://github.com/LEOYoon-Tsaw/Rime_collections/blob/master/Rime_description.md
local context=env.engine.context local ascii_mode=context:get_option("ascii_mode") context:set_option("ascii_mode" , not ascii_mode)
local function toggle(key) local value=context:get_option(key) context:set_option(key, not value) end