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

[docs] Any document about liquid_keyboard #1269

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

[docs] Any document about liquid_keyboard #1269

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

Comments

@Freed-Wu
Copy link
Contributor

I search clipboard and draft, as a result, I found they seem to be related to liquid_keyboard. However I cannot find any document about liquid_keyboard in https://github.com/osfans/trime/wiki/trime.yaml-%E8%A9%B3%E8%A7%A3

Can I have

switches:
  # 这个按键用来切换键盘布局(在主键盘、数字键盘、英文键盘之间轮换)
  - options: [_keyboard_.default, _keyboard_number, _keyboard_letter, _keyboard_clipboard]
    states: [默认, 123, abc, clipboard]

?

@goofyz
Copy link
Collaborator

goofyz commented Feb 26, 2024

Yes, you can.

In trime.yaml, there are preset_keys like liquid_keyboard_emoji and liquid_keyboard_emoji. You can add them to switch like

  - options: [_key_liquid_keyboard_emoji, liquid_keyboard_clipboard,_keyboard_mini]
    states: ["😃️", "CLIP", "🎹"]

You can add a custom key to preset_keys as well.

@Freed-Wu
Copy link
Contributor Author

Freed-Wu commented Feb 26, 2024

I try however it cannot work for me 😢 :

double_pinyin_mspy.custom.yaml:

---
patch:
  __include: emoji_suggestion:/patch
  switches/@before 0:
    name: keyboard
    reset: 0
    options:
      - _keyboard_.default
      - liquid_keyboard_clipboard
      - liquid_keyboard_draft
      - _keyboard_kao_happy
    states:
      - "⌨️\uFE0E"
      - 📋
      - 📝
      - ^_^

Screenshot_20240226_150413

The keyboard still be mini (connected bluetooth keyboard) not clipboard.

@goofyz
Copy link
Collaborator

goofyz commented Feb 26, 2024

Sorry, you need to add _key_ as a prefix to preset_keys. The options should be

    options:
      - _keyboard_.default
      - _key_liquid_keyboard_clipboard
      - _key_liquid_keyboard_draft
      - _keyboard_kao_happy

For liquid_keyboard_draft, you need to add a preset_key to your trime.custom.yaml yourself as it is not built-in.

patch: 
  "preset_keys/liquid_keyboard_draft": { label: "Draft", send: function, command: liquid_keyboard, option: "草稿"}

@Freed-Wu
Copy link
Contributor Author

Thanks. _key_ is needed.

I found it will override candidate and I must press 返回 to return original candidate. Can we keep original candidate when we use clipboard keyboard?

Original candidate:

Screenshot_20240226_160807

Aftre switching to clipboard:

Screenshot_20240226_160608

Screenshot_20240226_161018

@goofyz
Copy link
Collaborator

goofyz commented Feb 27, 2024

There is no way. It is programmed to hide "switch" & "candidate" when switched to liquid keyboard.

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

2 participants