Skip to content

Commit

Permalink
[Update] Second tap on SandS etc. will not input modifier key
Browse files Browse the repository at this point in the history
  • Loading branch information
omonomo committed Dec 6, 2024
1 parent 9dc008b commit e2c94e0
Show file tree
Hide file tree
Showing 2 changed files with 291 additions and 4 deletions.
63 changes: 62 additions & 1 deletion public/json/om_fn_to_esc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,85 @@
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "variable_if",
"name": "fn-esc",
"value": 1
}
],
"from": {
"key_code": "fn",
"modifiers": {
"optional": [
"shift",
"option",
"control",
"command",
"caps_lock"
]
}
},
"to": [
{
"key_code": "fn"
"key_code": "fn",
"lazy": true
}
],
"to_if_alone": [
{
"key_code": "escape"
}
]
},
{
"type": "basic",
"from": {
"key_code": "fn",
"modifiers": {
"optional": [
"shift",
"option",
"control",
"command",
"caps_lock"
]
}
},
"to": [
{
"key_code": "fn"
}
],
"to_if_alone": [
{
"key_code": "escape"
},
{
"set_variable": {
"name": "fn-esc",
"value": 1
}
}
],
"to_delayed_action": {
"to_if_invoked": [
{
"set_variable": {
"name": "fn-esc",
"value": 0
}
}
],
"to_if_canceled": [
{
"set_variable": {
"name": "fn-esc",
"value": 0
}
}
]
}
}
]
}
Expand Down
232 changes: 229 additions & 3 deletions public/json/om_personal_rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "variable_if",
"name": "shift-space",
"value": 1
}
],
"from": {
"key_code": "spacebar",
"modifiers": {
Expand All @@ -107,7 +114,8 @@
},
"to": [
{
"key_code": "left_shift"
"key_code": "left_shift",
"lazy": true
}
],
"to_if_alone": [
Expand All @@ -116,6 +124,55 @@
}
]
},
{
"type": "basic",
"from": {
"key_code": "spacebar",
"modifiers": {
"optional": [
"shift",
"option",
"control",
"command",
"caps_lock"
]
}
},
"to": [
{
"key_code": "left_shift"
}
],
"to_if_alone": [
{
"key_code": "spacebar"
},
{
"set_variable": {
"name": "shift-space",
"value": 1
}
}
],
"to_delayed_action": {
"to_if_invoked": [
{
"set_variable": {
"name": "shift-space",
"value": 0
}
}
],
"to_if_canceled": [
{
"set_variable": {
"name": "shift-space",
"value": 0
}
}
]
}
},
{
"type": "basic",
"from": {
Expand All @@ -138,6 +195,13 @@
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "variable_if",
"name": "control-return",
"value": 1
}
],
"from": {
"key_code": "return_or_enter",
"modifiers": {
Expand All @@ -152,7 +216,8 @@
},
"to": [
{
"key_code": "left_control"
"key_code": "left_control",
"lazy": true
}
],
"to_if_alone": [
Expand All @@ -161,6 +226,55 @@
}
]
},
{
"type": "basic",
"from": {
"key_code": "return_or_enter",
"modifiers": {
"optional": [
"shift",
"option",
"control",
"command",
"caps_lock"
]
}
},
"to": [
{
"key_code": "left_control"
}
],
"to_if_alone": [
{
"key_code": "return_or_enter"
},
{
"set_variable": {
"name": "control-return",
"value": 1
}
}
],
"to_delayed_action": {
"to_if_invoked": [
{
"set_variable": {
"name": "control-return",
"value": 0
}
}
],
"to_if_canceled": [
{
"set_variable": {
"name": "control-return",
"value": 0
}
}
]
}
},
{
"type": "basic",
"from": {
Expand Down Expand Up @@ -639,6 +753,38 @@
{
"description": "Left_Command alone -> EISUU, Right_Command alone -> KANA",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "variable_if",
"name": "command-eisuu",
"value": 1
}
],
"from": {
"key_code": "left_command",
"modifiers": {
"optional": [
"shift",
"option",
"control",
"caps_lock"
]
}
},
"to": [
{
"key_code": "left_command",
"lazy": true
}
],
"to_if_alone": [
{
"key_code": "japanese_eisuu"
}
]
},
{
"type": "basic",
"from": {
Expand All @@ -660,6 +806,62 @@
"to_if_alone": [
{
"key_code": "japanese_eisuu"
},
{
"set_variable": {
"name": "command-eisuu",
"value": 1
}
}
],
"to_delayed_action": {
"to_if_invoked": [
{
"set_variable": {
"name": "command-eisuu",
"value": 0
}
}
],
"to_if_canceled": [
{
"set_variable": {
"name": "command-eisuu",
"value": 0
}
}
]
}
},
{
"type": "basic",
"conditions": [
{
"type": "variable_if",
"name": "command-kana",
"value": 1
}
],
"from": {
"key_code": "right_command",
"modifiers": {
"optional": [
"shift",
"option",
"control",
"caps_lock"
]
}
},
"to": [
{
"key_code": "right_command",
"lazy": true
}
],
"to_if_alone": [
{
"key_code": "japanese_kana"
}
]
},
Expand All @@ -684,8 +886,32 @@
"to_if_alone": [
{
"key_code": "japanese_kana"
},
{
"set_variable": {
"name": "command-kana",
"value": 1
}
}
]
],
"to_delayed_action": {
"to_if_invoked": [
{
"set_variable": {
"name": "command-kana",
"value": 0
}
}
],
"to_if_canceled": [
{
"set_variable": {
"name": "command-kana",
"value": 0
}
}
]
}
}
]
},
Expand Down

0 comments on commit e2c94e0

Please sign in to comment.