Skip to content

Commit

Permalink
Merge remote-tracking branch 'target/main' into mlewand-caps-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
mlewand committed Aug 22, 2023
2 parents 8f1d2c1 + 7c03986 commit 1a6566a
Show file tree
Hide file tree
Showing 62 changed files with 3,966 additions and 3,281 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Follow the steps below to create a PR and add your settings!
git switch -c my-settings
```

4. Put a JSON generator file (`.rb`, `.erb` or `.js`) into [src/json](https://github.com/pqrs-org/KE-complex_modifications/tree/main/src/json).
4. Put a JSON generator file (`.js`, `.rb` or `.erb`) into [src/json](https://github.com/pqrs-org/KE-complex_modifications/tree/main/src/json).
(Or put a `.json` file directly into [public/json](https://github.com/pqrs-org/KE-complex_modifications/tree/main/public/json) directly.)
5. <details>
<summary>
Expand Down
30 changes: 15 additions & 15 deletions public/json/emacs_key_bindings.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"^org\\.gnu\\.Emacs$",
"^org\\.gnu\\.AquamacsEmacs$",
"^org\\.gnu\\.Aquamacs$",
"^org\\.pqrs\\.unknownapp.conkeror$",
"^org\\.pqrs\\.unknownapp\\.conkeror$",
"^com\\.microsoft\\.rdc$",
"^com\\.microsoft\\.rdc\\.",
"^net\\.sf\\.cord$",
Expand Down Expand Up @@ -104,7 +104,7 @@
"^org\\.gnu\\.Emacs$",
"^org\\.gnu\\.AquamacsEmacs$",
"^org\\.gnu\\.Aquamacs$",
"^org\\.pqrs\\.unknownapp.conkeror$",
"^org\\.pqrs\\.unknownapp\\.conkeror$",
"^com\\.microsoft\\.rdc$",
"^com\\.microsoft\\.rdc\\.",
"^net\\.sf\\.cord$",
Expand Down Expand Up @@ -175,7 +175,7 @@
"^org\\.gnu\\.Emacs$",
"^org\\.gnu\\.AquamacsEmacs$",
"^org\\.gnu\\.Aquamacs$",
"^org\\.pqrs\\.unknownapp.conkeror$",
"^org\\.pqrs\\.unknownapp\\.conkeror$",
"^com\\.microsoft\\.rdc$",
"^com\\.microsoft\\.rdc\\.",
"^net\\.sf\\.cord$",
Expand Down Expand Up @@ -323,7 +323,7 @@
"^org\\.gnu\\.Emacs$",
"^org\\.gnu\\.AquamacsEmacs$",
"^org\\.gnu\\.Aquamacs$",
"^org\\.pqrs\\.unknownapp.conkeror$",
"^org\\.pqrs\\.unknownapp\\.conkeror$",
"^com\\.microsoft\\.rdc$",
"^com\\.microsoft\\.rdc\\.",
"^net\\.sf\\.cord$",
Expand Down Expand Up @@ -395,7 +395,7 @@
"^org\\.gnu\\.Emacs$",
"^org\\.gnu\\.AquamacsEmacs$",
"^org\\.gnu\\.Aquamacs$",
"^org\\.pqrs\\.unknownapp.conkeror$",
"^org\\.pqrs\\.unknownapp\\.conkeror$",
"^com\\.microsoft\\.rdc$",
"^com\\.microsoft\\.rdc\\.",
"^net\\.sf\\.cord$",
Expand Down Expand Up @@ -467,7 +467,7 @@
"^org\\.gnu\\.Emacs$",
"^org\\.gnu\\.AquamacsEmacs$",
"^org\\.gnu\\.Aquamacs$",
"^org\\.pqrs\\.unknownapp.conkeror$",
"^org\\.pqrs\\.unknownapp\\.conkeror$",
"^com\\.microsoft\\.rdc$",
"^com\\.microsoft\\.rdc\\.",
"^net\\.sf\\.cord$",
Expand Down Expand Up @@ -539,7 +539,7 @@
"^org\\.gnu\\.Emacs$",
"^org\\.gnu\\.AquamacsEmacs$",
"^org\\.gnu\\.Aquamacs$",
"^org\\.pqrs\\.unknownapp.conkeror$",
"^org\\.pqrs\\.unknownapp\\.conkeror$",
"^com\\.microsoft\\.rdc$",
"^com\\.microsoft\\.rdc\\.",
"^net\\.sf\\.cord$",
Expand Down Expand Up @@ -610,7 +610,7 @@
"^org\\.gnu\\.Emacs$",
"^org\\.gnu\\.AquamacsEmacs$",
"^org\\.gnu\\.Aquamacs$",
"^org\\.pqrs\\.unknownapp.conkeror$",
"^org\\.pqrs\\.unknownapp\\.conkeror$",
"^com\\.microsoft\\.rdc$",
"^com\\.microsoft\\.rdc\\.",
"^net\\.sf\\.cord$",
Expand Down Expand Up @@ -844,7 +844,7 @@
"^org\\.gnu\\.Emacs$",
"^org\\.gnu\\.AquamacsEmacs$",
"^org\\.gnu\\.Aquamacs$",
"^org\\.pqrs\\.unknownapp.conkeror$",
"^org\\.pqrs\\.unknownapp\\.conkeror$",
"^com\\.microsoft\\.rdc$",
"^com\\.microsoft\\.rdc\\.",
"^net\\.sf\\.cord$",
Expand Down Expand Up @@ -918,7 +918,7 @@
"^org\\.gnu\\.Emacs$",
"^org\\.gnu\\.AquamacsEmacs$",
"^org\\.gnu\\.Aquamacs$",
"^org\\.pqrs\\.unknownapp.conkeror$",
"^org\\.pqrs\\.unknownapp\\.conkeror$",
"^com\\.microsoft\\.rdc$",
"^com\\.microsoft\\.rdc\\.",
"^net\\.sf\\.cord$",
Expand Down Expand Up @@ -992,7 +992,7 @@
"^org\\.gnu\\.Emacs$",
"^org\\.gnu\\.AquamacsEmacs$",
"^org\\.gnu\\.Aquamacs$",
"^org\\.pqrs\\.unknownapp.conkeror$",
"^org\\.pqrs\\.unknownapp\\.conkeror$",
"^com\\.microsoft\\.rdc$",
"^com\\.microsoft\\.rdc\\.",
"^net\\.sf\\.cord$",
Expand Down Expand Up @@ -1065,7 +1065,7 @@
"^org\\.gnu\\.Emacs$",
"^org\\.gnu\\.AquamacsEmacs$",
"^org\\.gnu\\.Aquamacs$",
"^org\\.pqrs\\.unknownapp.conkeror$",
"^org\\.pqrs\\.unknownapp\\.conkeror$",
"^com\\.microsoft\\.rdc$",
"^com\\.microsoft\\.rdc\\.",
"^net\\.sf\\.cord$",
Expand Down Expand Up @@ -1266,7 +1266,7 @@
"^org\\.gnu\\.Emacs$",
"^org\\.gnu\\.AquamacsEmacs$",
"^org\\.gnu\\.Aquamacs$",
"^org\\.pqrs\\.unknownapp.conkeror$",
"^org\\.pqrs\\.unknownapp\\.conkeror$",
"^com\\.microsoft\\.rdc$",
"^com\\.microsoft\\.rdc\\.",
"^net\\.sf\\.cord$",
Expand Down Expand Up @@ -1344,7 +1344,7 @@
"^org\\.gnu\\.Emacs$",
"^org\\.gnu\\.AquamacsEmacs$",
"^org\\.gnu\\.Aquamacs$",
"^org\\.pqrs\\.unknownapp.conkeror$",
"^org\\.pqrs\\.unknownapp\\.conkeror$",
"^com\\.microsoft\\.rdc$",
"^com\\.microsoft\\.rdc\\.",
"^net\\.sf\\.cord$",
Expand Down Expand Up @@ -1422,7 +1422,7 @@
"^org\\.gnu\\.Emacs$",
"^org\\.gnu\\.AquamacsEmacs$",
"^org\\.gnu\\.Aquamacs$",
"^org\\.pqrs\\.unknownapp.conkeror$",
"^org\\.pqrs\\.unknownapp\\.conkeror$",
"^com\\.microsoft\\.rdc$",
"^com\\.microsoft\\.rdc\\.",
"^net\\.sf\\.cord$",
Expand Down
3 changes: 3 additions & 0 deletions public/json/exchange_numbers_and_symbols.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"title": "Exchange numbers and symbols",
"maintainers": [
"tekezo"
],
"rules": [
{
"description": "Exchange numbers and symbols (1234567890 and !@#$%^&*())",
Expand Down
2 changes: 1 addition & 1 deletion public/json/mouse_keys_full.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
"to": [
{
"mouse_key": {
"speed_multiplier": 2.0
"speed_multiplier": 2
}
}
],
Expand Down
4 changes: 2 additions & 2 deletions public/json/mouse_keys_mode_v4.json
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@
"to": [
{
"mouse_key": {
"speed_multiplier": 2.0
"speed_multiplier": 2
}
}
],
Expand Down Expand Up @@ -927,7 +927,7 @@
},
{
"mouse_key": {
"speed_multiplier": 2.0
"speed_multiplier": 2
}
}
],
Expand Down
3 changes: 3 additions & 0 deletions public/json/mouse_keys_simple.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"title": "Mouse keys (simple) (rev 1)",
"maintainers": [
"tekezo"
],
"rules": [
{
"description": "Mouse keys (simple) (rev 1)",
Expand Down
10 changes: 3 additions & 7 deletions src/json/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@

This directory contains the JSON generator.

These JSON generators will be called by [update-json.sh](../../scripts/update-json.sh).
These JSON generators will be called by [update-json.sh](../../core/scripts/update-json.sh).
The output files are saved to public/json.

## Supported file extensions

- .js (nodejs is required)
- .js
- .rb
- .erb

## Supported filename format

To generate JSON files successfully, the filename must match `*.json.<file-extension>`.

- *\** : your self-defined name
- *.json* : must add `.json` before filename extension
- *.file-extension* : `.js` or `.rb` or `.erb`
To generate JSON files successfully, the filename must match `*.json.{file-extension}`.
171 changes: 171 additions & 0 deletions src/json/caps_lock.json.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
// JavaScript should be written in ECMAScript 5.1.

function main() {
console.log(
JSON.stringify(
{
title: 'Change caps_lock key (rev 5)',
rules: [
{
description:
'Change caps_lock key to command+control+option+shift if pressed with other keys',
manipulators: [
{
type: 'basic',
from: {
key_code: 'caps_lock',
modifiers: { optional: ['any'] },
},
to: [
{
key_code: 'left_shift',
modifiers: ['left_command', 'left_control', 'left_option'],
},
],
to_if_alone: [
{
hold_down_milliseconds: 100,
key_code: 'caps_lock',
},
],
},
],
},
{
description:
'Change caps_lock key to command+control+option+shift. (Post escape key when pressed alone)',
manipulators: [
{
type: 'basic',
from: {
key_code: 'caps_lock',
modifiers: { optional: ['any'] },
},
to: [
{
key_code: 'left_shift',
modifiers: ['left_command', 'left_control', 'left_option'],
},
],
to_if_alone: [
{
key_code: 'escape',
},
],
},
],
},
{
description:
'Change caps_lock key to command+control+option+shift. (Post f19 key when pressed alone)',
manipulators: [
{
type: 'basic',
from: {
key_code: 'caps_lock',
modifiers: { optional: ['any'] },
},
to: [
{
key_code: 'left_shift',
modifiers: ['left_command', 'left_control', 'left_option'],
},
],
to_if_alone: [
{
key_code: 'f19',
},
],
},
],
},
{
description:
'Change caps_lock key to command+control+option+shift. (Use shift+caps_lock as caps_lock)',
manipulators: [
{
type: 'basic',
from: {
key_code: 'caps_lock',
modifiers: {
mandatory: ['shift'],
optional: ['caps_lock'],
},
},
to: [
{
key_code: 'caps_lock',
},
],
},
{
type: 'basic',
from: {
key_code: 'caps_lock',
modifiers: { optional: ['any'] },
},
to: [
{
key_code: 'left_shift',
modifiers: ['left_command', 'left_control', 'left_option'],
},
],
},
],
},
{
description:
'Change caps_lock to control if pressed with other keys, to escape if pressed alone.',
manipulators: [
{
type: 'basic',
from: {
key_code: 'caps_lock',
modifiers: { optional: ['any'] },
},
to: [
{
key_code: 'left_control',
},
],
to_if_alone: [
{
key_code: 'escape',
},
],
},
],
},
{
description:
'Change caps_lock to control if pressed with other keys. (rev 2)',
manipulators: [
{
type: 'basic',
from: {
key_code: 'caps_lock',
modifiers: { optional: ['any'] },
},
to: [
{
key_code: 'left_control',
},
],
to_if_alone: [
{
key_code: 'caps_lock',
hold_down_milliseconds: 500,
},
],
},
],
},
],
},
null,
' '
)
)
}

main()
Loading

0 comments on commit 1a6566a

Please sign in to comment.