diff --git a/public/groups.json b/public/groups.json index 524b39a03..6c695b2cc 100644 --- a/public/groups.json +++ b/public/groups.json @@ -526,6 +526,18 @@ { "path": "json/xcode.json" }, + { + "path": "json/vs_code_left_ctrl_toggle_sidebar.json" + }, + { + "path": "json/vs_code_left_option_toggle_terminal.json" + }, + { + "path": "json/vs_code_left_shift_search_symbols.json" + }, + { + "path": "json/vs_code_right_cmd_zen_mode.json" + }, { "path": "json/vscode.json", "extra_description_path": "extra_descriptions/vscode.json.html" diff --git a/public/json/mac_osx_disable_cmd_h.json b/public/json/mac_osx_disable_cmd_h.json new file mode 100644 index 000000000..c90bc5eca --- /dev/null +++ b/public/json/mac_osx_disable_cmd_h.json @@ -0,0 +1,21 @@ +{ + "title": "disable cmd + h (Mac OSX: Disable Minimise Windows)", + "author": "Carlo van Wyk (https://github.com/thecarlo)", + "maintainers": ["thecarlo"], + "rules": [ + { + "description": "disable cmd + h (Mac OSX: Disable Minimise Windows)", + "manipulators": [ + { + "from": { + "key_code": "h", + "modifiers": { + "mandatory": ["command"] + } + }, + "type": "basic" + } + ] + } + ] +} diff --git a/public/json/rk61_for_mac.json b/public/json/rk61_for_mac.json new file mode 100644 index 000000000..0d0290cb6 --- /dev/null +++ b/public/json/rk61_for_mac.json @@ -0,0 +1,59 @@ +{ + "title": "RK61 Keyboard Mac Fix: Tilde and Slash Key Remapping", + "maintainers": [ + "juan-28" + ], + "rules": [ + { + "description": "right_shift + esc → ~", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "escape", + "modifiers": { + "mandatory": [ + "right_shift" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "grave_accent_and_tilde", + "modifiers": [ + "left_shift" + ] + } + ] + } + ] + }, + { + "description": "up_arrow turn to slash when press with left_command", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "up_arrow", + "modifiers": { + "mandatory": [ + "left_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "slash" + } + ] + } + ] + } + ] +} diff --git a/public/json/super-ctrl.json b/public/json/super-ctrl.json new file mode 100644 index 000000000..f65f8d271 --- /dev/null +++ b/public/json/super-ctrl.json @@ -0,0 +1,607 @@ +{ + "title": "Super ctrl + cmd!", + "rules": [ + { + "description": "ctrl + S を option + ← に変換", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "s", + "modifiers": { + "mandatory": ["control"] + } + }, + "to": [ + { + "key_code": "left_arrow", + "modifiers": ["option"] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "com.microsoft.VSCode", + "com.apple.Terminal", + "com.googlecode.iterm2", + "net.kovidgoyal.kitty", + "com.github.wez.wezterm" + ] + } + ] + } + ] + }, + { + "description": "ctrl + G を option + → に変換", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "g", + "modifiers": { + "mandatory": ["control"] + } + }, + "to": [ + { + "key_code": "right_arrow", + "modifiers": ["option"] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "com.microsoft.VSCode", + "com.apple.Terminal", + "com.googlecode.iterm2", + "net.kovidgoyal.kitty", + "com.github.wez.wezterm" + ] + } + ] + } + ] + }, + { + "description": "ctrl + W を option + Delete に変換", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "w", + "modifiers": { + "mandatory": ["control"] + } + }, + "to": [ + { + "key_code": "delete_or_backspace", + "modifiers": ["option"] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "com.microsoft.VSCode", + "com.apple.Terminal", + "com.googlecode.iterm2", + "net.kovidgoyal.kitty", + "com.github.wez.wezterm" + ] + } + ] + } + ] + }, + { + "description": "ctrl + X を fn + option + Delete に変換", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "x", + "modifiers": { + "mandatory": ["control"] + } + }, + "to": [ + { + "key_code": "delete_or_backspace", + "modifiers": ["option", "fn"] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "com.microsoft.VSCode", + "com.apple.Terminal", + "com.googlecode.iterm2", + "net.kovidgoyal.kitty", + "com.github.wez.wezterm" + ] + } + ] + } + ] + }, + { + "description": "ctrl + U を cmd + Delete に変換", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "u", + "modifiers": { + "mandatory": ["control"] + } + }, + "to": [ + { + "key_code": "delete_or_backspace", + "modifiers": ["command"] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "com.microsoft.VSCode", + "com.apple.Terminal", + "com.googlecode.iterm2", + "net.kovidgoyal.kitty", + "com.github.wez.wezterm" + ] + } + ] + } + ] + }, + { + "description": "ctrl + H を Delete に変換", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "h", + "modifiers": { + "mandatory": ["control"] + } + }, + "to": [ + { + "key_code": "delete_or_backspace" + } + ] + } + ] + }, + { + "description": "ctrl + D を fn + Delete に変換", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "d", + "modifiers": { + "mandatory": ["control"] + } + }, + "to": [ + { + "key_code": "delete_or_backspace", + "modifiers": ["fn"] + } + ], + "conditions": [ + { + "type": "frontmost_application_if", + "bundle_identifiers": [ + "com.figma.Desktop" + ] + } + ] + } + ] + }, + { + "description": "ctrl + P を up_arrow に変換", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "p", + "modifiers": { "mandatory": ["control"] } + }, + "to": [ + { + "key_code": "up_arrow" + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "com.microsoft.VSCode", + "com.apple.Terminal", + "com.googlecode.iterm2", + "net.kovidgoyal.kitty", + "com.github.wez.wezterm" + ] + } + ] + } + ] + }, + { + "description": "ctrl + N を down_arrow に変換", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "n", + "modifiers": { "mandatory": ["control"] } + }, + "to": [ + { + "key_code": "down_arrow" + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "com.microsoft.VSCode", + "com.apple.Terminal", + "com.googlecode.iterm2", + "net.kovidgoyal.kitty", + "com.github.wez.wezterm" + ] + } + ] + } + ] + }, + { + "description": "ctrl + J を return_or_enter に変換", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "j", + "modifiers": { "mandatory": ["control"] } + }, + "to": [ + { + "key_code": "return_or_enter" + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "com.microsoft.VSCode", + "com.apple.Terminal", + "com.googlecode.iterm2", + "net.kovidgoyal.kitty", + "com.github.wez.wezterm" + ] + } + ] + } + ] + }, + { + "description": "S,D,F の同時押しで escape", + "manipulators": [ + { + "type": "basic", + "from": { + "simultaneous": [ + { "key_code": "s" }, + { "key_code": "d" }, + { "key_code": "f" } + ] + }, + "to": [ + { "key_code": "escape" } + ] + } + ] + }, + { + "description": "left_ctrl を 2 回連打したら Raycast を起動する", + "manipulators": [ + { + "type": "basic", + "from": { "key_code": "left_control" }, + "to": [{ "shell_command": "open -a Raycast.app" }], + "conditions": [ + { + "type": "variable_if", + "name": "left_control_key", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "left_control", + "modifiers": { "optional": ["any"] } + }, + "to": [ + { + "set_variable": { + "name": "left_control_key", + "value": 1 + } + }, + { "key_code": "left_control" } + ], + "to_delayed_action": { + "to_if_invoked": [ + { + "set_variable": { + "name": "left_control_key", + "value": 0 + } + } + ], + "to_if_canceled": [ + { + "set_variable": { + "name": "left_control_key", + "value": 0 + } + } + ] + }, + "conditions": [ + { + "type": "variable_if", + "name": "left_control_key", + "value": 0 + } + ] + } + ] + }, + { + "description": "left_shift を 2 回連打したら WezTerm を起動する", + "manipulators": [ + { + "type": "basic", + "from": { "key_code": "left_shift" }, + "to": [{ "shell_command": "open -a WezTerm.app" }], + "conditions": [ + { + "type": "variable_if", + "name": "left_shift_key", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "left_shift", + "modifiers": { "optional": ["any"] } + }, + "to": [ + { + "set_variable": { + "name": "left_shift_key", + "value": 1 + } + }, + { "key_code": "left_shift" } + ], + "to_delayed_action": { + "to_if_invoked": [ + { + "set_variable": { + "name": "left_shift_key", + "value": 0 + } + } + ], + "to_if_canceled": [ + { + "set_variable": { + "name": "left_shift_key", + "value": 0 + } + } + ] + }, + "conditions": [ + { + "type": "variable_if", + "name": "left_shift_key", + "value": 0 + } + ] + } + ] + }, + { + "description": "left_cmd を 2 回連打したら Brave を起動する", + "manipulators": [ + { + "type": "basic", + "from": { "key_code": "left_command" }, + "to": [{ "shell_command": "open -a 'Brave Browser.app'" }], + "conditions": [ + { + "type": "variable_if", + "name": "left_command_key", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "left_command", + "modifiers": { "optional": ["any"] } + }, + "to": [ + { + "set_variable": { + "name": "left_command_key", + "value": 1 + } + }, + { "key_code": "left_command" } + ], + "to_delayed_action": { + "to_if_invoked": [ + { + "set_variable": { + "name": "left_command_key", + "value": 0 + } + } + ], + "to_if_canceled": [ + { + "set_variable": { + "name": "left_command_key", + "value": 0 + } + } + ] + }, + "conditions": [ + { + "type": "variable_if", + "name": "left_command_key", + "value": 0 + } + ] + } + ] + }, + { + "description": "left_option を 2 回連打したら Figma を起動する", + "manipulators": [ + { + "type": "basic", + "from": { "key_code": "left_option" }, + "to": [{ "shell_command": "open -a Figma.app" }], + "conditions": [ + { + "type": "variable_if", + "name": "left_option_key", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "left_option", + "modifiers": { "optional": ["any"] } + }, + "to": [ + { + "set_variable": { + "name": "left_option_key", + "value": 1 + } + }, + { "key_code": "left_option" } + ], + "to_delayed_action": { + "to_if_invoked": [ + { + "set_variable": { + "name": "left_option_key", + "value": 0 + } + } + ], + "to_if_canceled": [ + { + "set_variable": { + "name": "left_option_key", + "value": 0 + } + } + ] + }, + "conditions": [ + { + "type": "variable_if", + "name": "left_option_key", + "value": 0 + } + ] + } + ] + }, + { + "description": "right_shift を 2 回連打したら Cursor を起動する", + "manipulators": [ + { + "type": "basic", + "from": { "key_code": "right_shift" }, + "to": [{ "shell_command": "open -a Cursor.app" }], + "conditions": [ + { + "type": "variable_if", + "name": "right_shift_key", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "right_shift", + "modifiers": { "optional": ["any"] } + }, + "to": [ + { + "set_variable": { + "name": "right_shift_key", + "value": 1 + } + }, + { "key_code": "right_shift" } + ], + "to_delayed_action": { + "to_if_invoked": [ + { + "set_variable": { + "name": "right_shift_key", + "value": 0 + } + } + ], + "to_if_canceled": [ + { + "set_variable": { + "name": "right_shift_key", + "value": 0 + } + } + ] + }, + "conditions": [ + { + "type": "variable_if", + "name": "right_shift_key", + "value": 0 + } + ] + } + ] + } + ] +} diff --git a/public/json/vs_code_left_ctrl_toggle_sidebar.json b/public/json/vs_code_left_ctrl_toggle_sidebar.json new file mode 100644 index 000000000..757f783c9 --- /dev/null +++ b/public/json/vs_code_left_ctrl_toggle_sidebar.json @@ -0,0 +1,38 @@ +{ + "title": "left ctrl → cmd + b (VS Code → toggle sidebar)", + "author": "Carlo van Wyk (https://github.com/thecarlo)", + "maintainers": ["thecarlo"], + "rules": [ + { + "description": "left ctrl → cmd + b (VS Code → toggle sidebar)", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "left_control", + "modifiers": { + "optional": ["any"] + } + }, + "to": [ + { + "key_code": "left_control" + } + ], + "to_if_alone": [ + { + "key_code": "b", + "modifiers": ["left_command"] + } + ], + "conditions": [ + { + "type": "frontmost_application_if", + "bundle_identifiers": ["^com\\.microsoft\\.VSCode$"] + } + ] + } + ] + } + ] +} diff --git a/public/json/vs_code_left_option_toggle_terminal.json b/public/json/vs_code_left_option_toggle_terminal.json new file mode 100644 index 000000000..47492cee0 --- /dev/null +++ b/public/json/vs_code_left_option_toggle_terminal.json @@ -0,0 +1,38 @@ +{ + "title": "left option → cmd + j (VS Code → toggle terminal)", + "author": "Carlo van Wyk (https://github.com/thecarlo)", + "maintainers": ["thecarlo"], + "rules": [ + { + "description": "left option → cmd + j (VS Code → toggle terminal)", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "left_option", + "modifiers": { + "optional": ["any"] + } + }, + "to": [ + { + "key_code": "left_option" + } + ], + "to_if_alone": [ + { + "key_code": "j", + "modifiers": ["left_command"] + } + ], + "conditions": [ + { + "type": "frontmost_application_if", + "bundle_identifiers": ["^com\\.microsoft\\.VSCode$", "com\\.microsoft\\.VSCodeInsiders"] + } + ] + } + ] + } + ] +} diff --git a/public/json/vs_code_left_shift_search_symbols.json b/public/json/vs_code_left_shift_search_symbols.json new file mode 100644 index 000000000..6b0427e6d --- /dev/null +++ b/public/json/vs_code_left_shift_search_symbols.json @@ -0,0 +1,38 @@ +{ + "title": "left shift → cmd + shift + o (VS Code → search symbols)", + "author": "Carlo van Wyk (https://github.com/thecarlo)", + "maintainers": ["thecarlo"], + "rules": [ + { + "description": "left shift → cmd + shift + o (VS Code → search symbols)", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "left_shift", + "modifiers": { + "optional": ["any"] + } + }, + "to": [ + { + "key_code": "left_shift" + } + ], + "to_if_alone": [ + { + "key_code": "o", + "modifiers": ["left_command", "left_shift"] + } + ], + "conditions": [ + { + "type": "frontmost_application_if", + "bundle_identifiers": ["^com\\.microsoft\\.VSCode$", "com\\.microsoft\\.VSCodeInsiders"] + } + ] + } + ] + } + ] +} diff --git a/public/json/vs_code_right_cmd_zen_mode.json b/public/json/vs_code_right_cmd_zen_mode.json new file mode 100644 index 000000000..0efc49395 --- /dev/null +++ b/public/json/vs_code_right_cmd_zen_mode.json @@ -0,0 +1,40 @@ +{ + "title": "right cmd → left cmd + k, z (VS Code → Zen Mode)", + "author": "Carlo van Wyk (https://github.com/thecarlo)", + "maintainers": ["thecarlo"], + "rules": [ + { + "description": "right cmd → left cmd + k, z (VS Code → Zen Mode)", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "right_command", + "modifiers": { + "optional": ["any"] + } + }, + "to": [ + { + "key_code": "k", + "modifiers": ["left_command"] + } + ], + "to_delayed_action": { + "to_if_invoked": [ + { + "key_code": "z" + } + ] + }, + "conditions": [ + { + "type": "frontmost_application_if", + "bundle_identifiers": ["^com\\.microsoft\\.VSCode$", "com\\.microsoft\\.VSCodeInsiders"] + } + ] + } + ] + } + ] +} diff --git a/src/json/rk61_for_mac.json.js b/src/json/rk61_for_mac.json.js new file mode 100644 index 000000000..6744ec641 --- /dev/null +++ b/src/json/rk61_for_mac.json.js @@ -0,0 +1,60 @@ +// JavaScript should be written in ECMAScript 5.1. + +function main() { + console.log( + JSON.stringify( + { + title: 'RK61 Keyboard Mac Fix: Tilde and Slash Key Remapping', + maintainers:['juan-28'], + rules: [ + { + description: 'right_shift + esc → ~', + manipulators: [ + { + type: 'basic', + from: { + key_code: 'escape', + modifiers: { + mandatory: ['right_shift'], + optional: ['any'], + }, + }, + to: [ + { + key_code: 'grave_accent_and_tilde', + modifiers: ['left_shift'], + }, + ], + }, + ], + }, + { + description: 'up_arrow turn to slash when press with left_command', + manipulators: [ + { + type: 'basic', + from: { + key_code: 'up_arrow', + modifiers: { + mandatory: ['left_command'], + optional: ['any'], + }, + }, + to: [ + { + key_code: 'slash', + }, + ], + }, + ], + }, + ], + }, + null, + ' ' + ) + ); +} + +main(); +