Skip to content

Commit

Permalink
Merge pull request #1767 from pqrs-org/improve-fine-volume-control
Browse files Browse the repository at this point in the history
Update fine_volume_control.json.js (support consumer keys, use system.use_fkeys_as_standard_function_keys)
  • Loading branch information
tekezo authored Dec 29, 2024
2 parents e0f3e6d + 8491960 commit 076ecdf
Show file tree
Hide file tree
Showing 2 changed files with 315 additions and 85 deletions.
246 changes: 219 additions & 27 deletions public/json/fine_volume_control.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,62 @@
{
"title": "Fine volume control (rev 2)",
"title": "Fine volume control (rev 3)",
"rules": [
{
"description": "Map volume controls to fine volume controls (Option + Shift + Volume)",
"available_since": "15.3.0",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "f11"
"key_code": "f11",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "volume_decrement",
"consumer_key_code": "volume_decrement",
"modifiers": [
"left_shift",
"left_option"
"left_option",
"left_shift"
]
}
],
"conditions": [
{
"type": "variable_unless",
"name": "system.use_fkeys_as_standard_function_keys",
"value": true
}
]
},
{
"type": "basic",
"from": {
"key_code": "f11",
"modifiers": {
"mandatory": [
"option",
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"consumer_key_code": "volume_decrement"
}
],
"conditions": [
{
"type": "variable_unless",
"name": "system.use_fkeys_as_standard_function_keys",
"value": true
}
]
},
{
Expand All @@ -26,75 +66,179 @@
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "f11",
"consumer_key_code": "volume_decrement",
"modifiers": [
"left_option",
"left_shift"
]
}
],
"conditions": [
{
"type": "variable_if",
"name": "system.use_fkeys_as_standard_function_keys",
"value": true
}
]
},
{
"type": "basic",
"from": {
"key_code": "f11",
"modifiers": {
"mandatory": [
"option",
"shift",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"consumer_key_code": "volume_decrement"
}
],
"conditions": [
{
"type": "variable_if",
"name": "system.use_fkeys_as_standard_function_keys",
"value": true
}
]
},
{
"type": "basic",
"from": {
"key_code": "f12"
"consumer_key_code": "volume_decrement",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "volume_increment",
"consumer_key_code": "volume_decrement",
"modifiers": [
"left_shift",
"left_option"
"left_option",
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "f12",
"consumer_key_code": "volume_decrement",
"modifiers": {
"mandatory": [
"fn"
"option",
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "f12",
"consumer_key_code": "volume_decrement"
}
]
},
{
"type": "basic",
"from": {
"key_code": "f12",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"consumer_key_code": "volume_increment",
"modifiers": [
"fn"
"left_option",
"left_shift"
]
}
],
"conditions": [
{
"type": "variable_unless",
"name": "system.use_fkeys_as_standard_function_keys",
"value": true
}
]
}
]
},
{
"description": "Map fn + volume controls to fine volume controls (Option + Shift + Volume)",
"manipulators": [
},
{
"type": "basic",
"from": {
"key_code": "f11",
"key_code": "f12",
"modifiers": {
"mandatory": [
"option",
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"consumer_key_code": "volume_increment"
}
],
"conditions": [
{
"type": "variable_unless",
"name": "system.use_fkeys_as_standard_function_keys",
"value": true
}
]
},
{
"type": "basic",
"from": {
"key_code": "f12",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "volume_decrement",
"consumer_key_code": "volume_increment",
"modifiers": [
"left_shift",
"left_option"
"left_option",
"left_shift"
]
}
],
"conditions": [
{
"type": "variable_if",
"name": "system.use_fkeys_as_standard_function_keys",
"value": true
}
]
},
{
Expand All @@ -103,18 +247,66 @@
"key_code": "f12",
"modifiers": {
"mandatory": [
"option",
"shift",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"consumer_key_code": "volume_increment"
}
],
"conditions": [
{
"type": "variable_if",
"name": "system.use_fkeys_as_standard_function_keys",
"value": true
}
]
},
{
"type": "basic",
"from": {
"consumer_key_code": "volume_increment",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "volume_increment",
"consumer_key_code": "volume_increment",
"modifiers": [
"left_shift",
"left_option"
"left_option",
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"consumer_key_code": "volume_increment",
"modifiers": {
"mandatory": [
"option",
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"consumer_key_code": "volume_increment"
}
]
}
]
Expand Down
Loading

0 comments on commit 076ecdf

Please sign in to comment.