Skip to content

Commit

Permalink
update shifter for semicolon and quote
Browse files Browse the repository at this point in the history
  • Loading branch information
qbosen committed Oct 9, 2022
1 parent 04be53e commit 30abc61
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
36 changes: 18 additions & 18 deletions custom/capslock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2465,7 +2465,7 @@
]
},
{
"description": "semicolon = !",
"description": "semicolon = _",
"type": "basic",
"from": {
"key_code": "semicolon",
Expand All @@ -2480,7 +2480,7 @@
},
"to": [
{
"key_code": "1",
"key_code": "hyphen",
"modifiers": [
"left_shift"
]
Expand Down Expand Up @@ -2509,7 +2509,7 @@
]
},
{
"description": "option + semicolon = _",
"description": "option + semicolon = $",
"type": "basic",
"from": {
"key_code": "semicolon",
Expand All @@ -2525,21 +2525,20 @@
},
"to": [
{
"key_code": "hyphen",
"key_code": "4",
"modifiers": [
"left_shift"
]
}
]
},
{
"description": "command + quote = +",
"description": "quote = equal_sign",
"type": "basic",
"from": {
"key_code": "quote",
"modifiers": {
"mandatory": [
"left_command",
"right_command",
"right_control",
"right_shift",
Expand All @@ -2549,21 +2548,18 @@
},
"to": [
{
"key_code": "equal_sign",
"modifiers": [
"left_shift"
]
"key_code": "equal_sign"
}
]
},
{
"description": "option + quote = $",
"description": "command + quote = +",
"type": "basic",
"from": {
"key_code": "quote",
"modifiers": {
"mandatory": [
"left_option",
"left_command",
"right_command",
"right_control",
"right_shift",
Expand All @@ -2573,20 +2569,21 @@
},
"to": [
{
"key_code": "4",
"key_code": "equal_sign",
"modifiers": [
"left_shift"
]
}
]
},
{
"description": "quote = equal_sign",
"description": "option + quote = &",
"type": "basic",
"from": {
"key_code": "quote",
"modifiers": {
"mandatory": [
"left_option",
"right_command",
"right_control",
"right_shift",
Expand All @@ -2596,7 +2593,10 @@
},
"to": [
{
"key_code": "equal_sign"
"key_code": "7",
"modifiers": [
"left_shift"
]
}
]
},
Expand Down Expand Up @@ -2624,7 +2624,7 @@
]
},
{
"description": "command + slash = pingyin",
"description": "command + slash = rime",
"type": "basic",
"from": {
"key_code": "slash",
Expand All @@ -2641,8 +2641,8 @@
"to": [
{
"select_input_source": {
"input_mode_id": "^com\\.apple\\.inputmethod\\.SCIM\\.ITABC$",
"input_source_id": "^com\\.apple\\.inputmethod\\.SCIM\\.ITABC$",
"input_mode_id": "^im\\.rime\\.inputmethod\\.Squirrel$",
"input_source_id": "^im\\.rime\\.inputmethod\\.Squirrel\\.Rime$",
"language": "zh-Hans"
}
}
Expand Down
28 changes: 14 additions & 14 deletions custom/capslock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -690,37 +690,37 @@ rules:
to: [ { key_code: '0' , modifiers: [ left_shift ] } ]

#==========================================================#
# semicolon / quote --> != (+command) :"
# semicolon / quote --> _= (+command) -+ (option) $&
#==========================================================#
- description: 'semicolon = !'
- description: 'semicolon = _'
type: basic
from: { key_code: semicolon, modifiers: { mandatory: [ right_command,right_control,right_shift,right_option ] } }
to: [ { key_code: '1' , modifiers: [ left_shift ] } ]
to: [ { key_code: 'hyphen' , modifiers: [ left_shift ] } ]

- description: 'command + semicolon = -'
type: basic
from: { key_code: semicolon, modifiers: { mandatory: [ left_command, right_command,right_control,right_shift,right_option ] } }
to: [ { key_code: hyphen } ]

- description: 'option + semicolon = _'
- description: 'option + semicolon = $'
type: basic
from: { key_code: semicolon, modifiers: { mandatory: [ left_option, right_command,right_control,right_shift,right_option ] } }
to: [ { key_code: hyphen , modifiers: [ left_shift ] } ]
to: [ { key_code: '4' , modifiers: [ left_shift ] } ]

- description: 'quote = equal_sign'
type: basic
from: { key_code: quote, modifiers: { mandatory: [ right_command,right_control,right_shift,right_option ] } }
to: [ { key_code: equal_sign } ]

- description: 'command + quote = +'
type: basic
from: { key_code: quote, modifiers: { mandatory: [ left_command, right_command,right_control,right_shift,right_option ] } }
to: [ { key_code: equal_sign , modifiers: [ left_shift ] } ]

- description: 'option + quote = $'
- description: 'option + quote = &'
type: basic
from: { key_code: quote, modifiers: { mandatory: [ left_option, right_command,right_control,right_shift,right_option ] } }
to: [ { key_code: '4' , modifiers: [ left_shift ] } ]

- description: 'quote = equal_sign'
type: basic
from: { key_code: quote, modifiers: { mandatory: [ right_command,right_control,right_shift,right_option ] } }
to: [ { key_code: equal_sign } ]
to: [ { key_code: '7' , modifiers: [ left_shift ] } ]

#==========================================================#
# / -> language switch; command: chinese
Expand All @@ -729,9 +729,9 @@ rules:
type: basic
from: { key_code: slash, modifiers: { mandatory: [ right_command,right_control,right_shift,right_option ] } }
to: [ { select_input_source: { input_source_id: "^com\\.apple\\.keylayout\\.ABC$", language: "en" } } ]
- description: 'command + slash = pingyin'
- description: 'command + slash = rime'
type: basic
from: { key_code: slash, modifiers: { mandatory: [ left_command, right_command,right_control,right_shift,right_option ] } }
to: [ { select_input_source: { input_mode_id: "^com\\.apple\\.inputmethod\\.SCIM\\.ITABC$", input_source_id: "^com\\.apple\\.inputmethod\\.SCIM\\.ITABC$", language: "zh-Hans" } } ]
to: [ { select_input_source: { input_mode_id: "^im\\.rime\\.inputmethod\\.Squirrel$", input_source_id: "^im\\.rime\\.inputmethod\\.Squirrel\\.Rime$", language: "zh-Hans" } } ]

...

0 comments on commit 30abc61

Please sign in to comment.