From b63802f4aef669cf6e7dc115b61fc07d95335cc4 Mon Sep 17 00:00:00 2001 From: amorphobia Date: Thu, 15 Aug 2024 14:31:13 +0800 Subject: [PATCH] Apply "sendKeys" operations --- hamster/default.custom.yaml | 2 ++ hamster/hamster.custom.yaml | 16 ++++++++++------ hamster/jiandao.custom.yaml | 5 +++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/hamster/default.custom.yaml b/hamster/default.custom.yaml index 4624728..e1b1115 100644 --- a/hamster/default.custom.yaml +++ b/hamster/default.custom.yaml @@ -3,6 +3,8 @@ patch: schema_list: - { schema: jiandao } - { schema: pinyin_simp } + switcher/hotkeys: + - Control+quoteright switcher/save_options/+: - traditionalization - martianization diff --git a/hamster/hamster.custom.yaml b/hamster/hamster.custom.yaml index 43790f3..1f1f8c1 100644 --- a/hamster/hamster.custom.yaml +++ b/hamster/hamster.custom.yaml @@ -139,7 +139,6 @@ patch: - { direction: down, action: { character: { char: ")" } }, display: false, processByRIME: true } callout: - { action: { symbol: { char: ")" } } } - - { action: { shortcutCommand: "#关闭键盘" }, label: "✖" } - { action: { symbol: { char: ")" } }, label: ")半" } - keys: - action: { character: { char: "q" } } @@ -149,9 +148,13 @@ patch: - { direction: down, action: { character: { char: "~" } }, processByRIME: true } - { direction: right, action: tab, processByRIME: true } - { action: { character: { char: "w" } }, width: { portrait: { percentage: 0.1 }, landscape: { percentage: 0.06 } } } - - { action: { character: { char: "e" } }, width: { portrait: { percentage: 0.1 }, landscape: { percentage: 0.06 } } } + - action: { character: { char: "e" } } + width: { portrait: { percentage: 0.1 }, landscape: { percentage: 0.06 } } + swipe: [{ direction: down, action: { shortcutCommand: { sendKeys: { keys: "Control+backslash" } } }, label: "绘文" }] - { action: { character: { char: "r" } }, width: { portrait: { percentage: 0.1 }, landscape: { percentage: 0.06 } } } - - { action: { character: { char: "t" } }, width: { portrait: { percentage: 0.1 }, landscape: { percentage: 0.06 } } } + - action: { character: { char: "t" } } + width: { portrait: { percentage: 0.1 }, landscape: { percentage: 0.06 } } + swipe: [{ direction: down, action: { shortcutCommand: { sendKeys: { keys: "Control+comma" } } }, label: "豆腐" }] - action: { character: { char: "y" } } width: { portrait: available, landscape: { percentage: 0.06 } } swipe: @@ -160,6 +163,7 @@ patch: - { action: none, width: { portrait: available, landscape: { percentage: 0.28 } } } - action: { character: { char: "t" } } width: { portrait: available, landscape: { percentage: 0.06 } } + swipe: [{ direction: down, action: { shortcutCommand: { sendKeys: { keys: "Control+comma" } } }, label: "豆腐" }] - action: { character: { char: "y" } } width: { portrait: { percentage: 0.1 }, landscape: { percentage: 0.06 } } swipe: @@ -196,9 +200,9 @@ patch: - action: { character: { char: "s" } } width: { portrait: { percentage: 0.1 }, landscape: { percentage: 0.0654545454545455 } } swipe: - - { direction: up, action: { shortcutCommand: "#RimeSwitcher" }, label: "选单" } - - { direction: down, action: { shortcutCommand: "#简繁切换" }, label: "简繁" } - callout: [{ action: { shortcutCommand: "#RimeSwitcher" }, label: "选单" }] + - { direction: up, action: { shortcutCommand: { sendKeys: { keys: "Control+quoteright" } } }, label: "选单" } + - { direction: down, action: { shortcutCommand: { sendKeys: { keys: "Control+slash" } } }, label: "简繁" } + callout: [{ action: { shortcutCommand: { sendKeys: { keys: "Control+quoteright" } } }, label: "选单" }] - { action: { character: { char: "d" } }, width: { portrait: { percentage: 0.1 }, landscape: { percentage: 0.0654545454545455 } } } - action: { character: { char: "f" } } width: { portrait: { percentage: 0.1 }, landscape: { percentage: 0.0654545454545455 } } diff --git a/hamster/jiandao.custom.yaml b/hamster/jiandao.custom.yaml index 908c2de..1e798f0 100644 --- a/hamster/jiandao.custom.yaml +++ b/hamster/jiandao.custom.yaml @@ -4,8 +4,9 @@ patch: switches/@2: { options: [ simplification, traditionalization, martianization ], abbrev: [ 汉, 漢, 焱 ], states: [ 通用规范汉字, 繁體字, 焱暒妏 ] } switches/@next: { name: notolization, abbrev: [ �, 字 ], states: [ ��, 文字 ] } key_binder/bindings: - - { when: has_menu, accept: "^", toggle: traditionalization } - - { when: has_menu, accept: "&", toggle: emoji_suggestion } + - { when: always, accept: "Control+slash", toggle: traditionalization } + - { when: always, accept: "Control+backslash", toggle: emoji_suggestion } + - { when: always, accept: "Control+comma", toggle: notolization } engine/filters/+: - simplifier@martianization - lua_filter@*comment_spliter