Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] How to toggle option by hot key #1268

Open
Freed-Wu opened this issue Feb 24, 2024 · 0 comments
Open

[question] How to toggle option by hot key #1268

Freed-Wu opened this issue Feb 24, 2024 · 0 comments

Comments

@Freed-Wu
Copy link
Contributor

According to https://github.com/osfans/trime/wiki/trime.yaml-%E8%A9%B3%E8%A7%A3

#xxx.schema.yaml

switches:

  # 这个按键用来切换键盘布局(在主键盘、数字键盘、英文键盘之间轮换)
  - options: [_keyboard_.default, _keyboard_number, _keyboard_letter]
    states: [默认, 123, abc]
  #多个键盘轮换的功能还有一些问题,有待完善

How can we toggle options by hotkey?

I try

double_pinyin_mspy.custom.yaml:

patch:
  __include: emoji_suggestion:/patch
  switches/@before 0:
    name: keyboard
    reset: 0
    options:
      - _keyboard_.default
      - _keyboard_XXX
    states:
      - XXX
      - YYY

default.custom.yaml:

patch:
  key_binder/bindings/@before 6:
    accept: Control+1
    toggle: keyboard
    when: always

and I expect press Ctrl + 1 can toggle keyboard, but it cannot work.

TIA!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant