Closed s-show closed 4 years ago
上記の質問の日本語版です。(画像の添付は省略します。) Japanese version of the above question. (Attaching images is omitted.)
私は、"Shift-Ctrl-Space"を2連打したら、DIYキーボードのキーマップを表示する設定を行いました。
私が使うキーボードは、"Plaid"と"ErgoDash"の2つであり、それぞれのキーボードでキーマップが異なるため、以下のコードのとおり、vendor_id
とproduct_id
を設定して、キーボードに合ったキーマップを表示するようにしました。
しかし、以下のスクリーンショットのとおり設定したあと、"Plaid"を外して"ErgoDash"だけを接続した状態で"Shift-Ctrl-Space"を2連打すると、vendor_id
とproduct_id
が合致しない{"description": "Double type 'Shift-Ctrl-Space', Open 'CheetSheet for Plaid'."}が実行されます。
キーを2連打したか判定するための変数が{"description": "Double type 'Shift-Ctrl-Space', Open 'CheetSheet for Plaid'."}と{"description": "Double type 'Shift-Ctrl-Space', Open 'CheetSheet for ErgoDash'."}で同じため、こうした問題が起きるのでしょうか?
参考資料として、"Plaid"と"ErgoDash"のvendor_id
とproduct_id
を掲載します。
The multiple conditions (e.g., variable_if
and device_if
) are combined with "AND".
You should add device_if
into shell_command manipulator as follows.
Without device_if
, the first shell_command (for Plaid) will always be applied.
{
"type": "basic",
"from": {
"key_code": "spacebar",
"modifiers": {
"mandatory": ["control", "shift"],
"optional": ["any"]
}
},
"to": [
{
"shell_command": "qlmanage -p ~/cheetsheet_ergodash.png > /dev/null 2<&1"
}
],
"conditions": [
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 5824,
"product_id": 10203,
"description": "Plaid"
}
]
},
{
"type": "variable_if",
"name": "ctrl_shift_space_tapCount",
"value": 1
}
]
},
I configured to display the key map of the DIY keyboard after hitting "Shift-Ctrl-Space" twice.
There are two keyboards I use, "Plaid" and "ErgoDash", and each keyboard has a different keymap. So, as shown in the following code, set
vendor_id
andproduct_id
to match the keyboard. The keymap is now displayed.However, after setting as shown in the screenshot below, if "Plaid" is removed and only "ErgoDash" is connected and "Shift-Ctrl-Space" is hit twice,
vendor_id
andproduct_id
do not match { "description": "Double type 'Shift-Ctrl-Space', Open 'CheetSheet for Plaid'."} is executed.Variables for determining whether the key has been hit twice are {"description": "Double type 'Shift-Ctrl-Space', Open 'CheetSheet for Plaid'."} And {"description": "Double type 'Shift-Ctrl -Space ', Open' CheetSheet for ErgoDash '. "} Will cause this problem?
As a reference material, "vendor_id" and "product_id" of "Plaid" and "ErgoDash" are posted.