From 10ec84003ccc6bf5af194c1768d59f899224302c Mon Sep 17 00:00:00 2001 From: Jan Gosmann Date: Sat, 7 Sep 2024 19:53:39 +0200 Subject: [PATCH 1/2] Add myself as maintainer for neo2.json rules --- public/json/neo2.json | 3 +++ src/json/neo2.json.js | 1 + 2 files changed, 4 insertions(+) diff --git a/public/json/neo2.json b/public/json/neo2.json index ff4830661..2e10be2a1 100644 --- a/public/json/neo2.json +++ b/public/json/neo2.json @@ -1,5 +1,8 @@ { "title": "Neo2", + "maintainers": [ + "jgosmann" + ], "rules": [ { "description": "Neo2 mod 3 and layer 4. Rule applied to all keyboards.", diff --git a/src/json/neo2.json.js b/src/json/neo2.json.js index dbbede6fc..83885ca07 100644 --- a/src/json/neo2.json.js +++ b/src/json/neo2.json.js @@ -7,6 +7,7 @@ function main() { JSON.stringify( { title: 'Neo2', + maintainers: ['jgosmann'], rules: rules() }, null, From bee284a5a948a4498695ac8001ce5078b075300d Mon Sep 17 00:00:00 2001 From: Jan Gosmann Date: Sat, 7 Sep 2024 19:54:04 +0200 Subject: [PATCH 2/2] Fix mapping of layer 4 insert and undo keys Issue reported here: https://git.neo-layout.org/neo/neo-layout/issues/658 --- public/json/neo2.json | 146 ++++++++++++++++++++---------------------- src/json/neo2.json.js | 8 ++- 2 files changed, 77 insertions(+), 77 deletions(-) diff --git a/public/json/neo2.json b/public/json/neo2.json index 2e10be2a1..e6b0d769c 100644 --- a/public/json/neo2.json +++ b/public/json/neo2.json @@ -743,7 +743,7 @@ { "type": "basic", "from": { - "key_code": "m", + "key_code": "b", "modifiers": { "optional": [ "shift", @@ -755,7 +755,7 @@ }, "to": [ { - "key_code": "keypad_1" + "key_code": "undo" } ], "conditions": [ @@ -789,7 +789,7 @@ { "type": "basic", "from": { - "key_code": "comma", + "key_code": "c", "modifiers": { "optional": [ "shift", @@ -801,7 +801,7 @@ }, "to": [ { - "key_code": "keypad_2" + "key_code": "insert" } ], "conditions": [ @@ -835,7 +835,7 @@ { "type": "basic", "from": { - "key_code": "period", + "key_code": "m", "modifiers": { "optional": [ "shift", @@ -847,7 +847,7 @@ }, "to": [ { - "key_code": "keypad_3" + "key_code": "keypad_1" } ], "conditions": [ @@ -881,7 +881,7 @@ { "type": "basic", "from": { - "key_code": "j", + "key_code": "comma", "modifiers": { "optional": [ "shift", @@ -893,7 +893,7 @@ }, "to": [ { - "key_code": "keypad_4" + "key_code": "keypad_2" } ], "conditions": [ @@ -927,7 +927,7 @@ { "type": "basic", "from": { - "key_code": "k", + "key_code": "period", "modifiers": { "optional": [ "shift", @@ -939,7 +939,7 @@ }, "to": [ { - "key_code": "keypad_5" + "key_code": "keypad_3" } ], "conditions": [ @@ -973,7 +973,7 @@ { "type": "basic", "from": { - "key_code": "l", + "key_code": "j", "modifiers": { "optional": [ "shift", @@ -985,7 +985,7 @@ }, "to": [ { - "key_code": "keypad_6" + "key_code": "keypad_4" } ], "conditions": [ @@ -1019,7 +1019,7 @@ { "type": "basic", "from": { - "key_code": "u", + "key_code": "k", "modifiers": { "optional": [ "shift", @@ -1031,7 +1031,7 @@ }, "to": [ { - "key_code": "keypad_7" + "key_code": "keypad_5" } ], "conditions": [ @@ -1065,7 +1065,7 @@ { "type": "basic", "from": { - "key_code": "i", + "key_code": "l", "modifiers": { "optional": [ "shift", @@ -1077,7 +1077,7 @@ }, "to": [ { - "key_code": "keypad_8" + "key_code": "keypad_6" } ], "conditions": [ @@ -1111,7 +1111,7 @@ { "type": "basic", "from": { - "key_code": "o", + "key_code": "u", "modifiers": { "optional": [ "shift", @@ -1123,7 +1123,7 @@ }, "to": [ { - "key_code": "keypad_9" + "key_code": "keypad_7" } ], "conditions": [ @@ -1157,7 +1157,7 @@ { "type": "basic", "from": { - "key_code": "spacebar", + "key_code": "i", "modifiers": { "optional": [ "shift", @@ -1169,7 +1169,7 @@ }, "to": [ { - "key_code": "keypad_0" + "key_code": "keypad_8" } ], "conditions": [ @@ -1203,7 +1203,7 @@ { "type": "basic", "from": { - "key_code": "9", + "key_code": "o", "modifiers": { "optional": [ "shift", @@ -1215,7 +1215,7 @@ }, "to": [ { - "key_code": "keypad_slash" + "key_code": "keypad_9" } ], "conditions": [ @@ -1249,7 +1249,7 @@ { "type": "basic", "from": { - "key_code": "0", + "key_code": "spacebar", "modifiers": { "optional": [ "shift", @@ -1261,7 +1261,7 @@ }, "to": [ { - "key_code": "keypad_asterisk" + "key_code": "keypad_0" } ], "conditions": [ @@ -1295,7 +1295,7 @@ { "type": "basic", "from": { - "key_code": "hyphen", + "key_code": "9", "modifiers": { "optional": [ "shift", @@ -1307,7 +1307,7 @@ }, "to": [ { - "key_code": "keypad_hyphen" + "key_code": "keypad_slash" } ], "conditions": [ @@ -1341,7 +1341,7 @@ { "type": "basic", "from": { - "key_code": "p", + "key_code": "0", "modifiers": { "optional": [ "shift", @@ -1353,7 +1353,7 @@ }, "to": [ { - "key_code": "keypad_plus" + "key_code": "keypad_asterisk" } ], "conditions": [ @@ -1387,7 +1387,7 @@ { "type": "basic", "from": { - "key_code": "v", + "key_code": "hyphen", "modifiers": { "optional": [ "shift", @@ -1399,7 +1399,7 @@ }, "to": [ { - "key_code": "return_or_enter" + "key_code": "keypad_hyphen" } ], "conditions": [ @@ -1433,7 +1433,7 @@ { "type": "basic", "from": { - "key_code": "quote", + "key_code": "p", "modifiers": { "optional": [ "shift", @@ -1445,7 +1445,7 @@ }, "to": [ { - "key_code": "period" + "key_code": "keypad_plus" } ], "conditions": [ @@ -1479,7 +1479,7 @@ { "type": "basic", "from": { - "key_code": "semicolon", + "key_code": "v", "modifiers": { "optional": [ "shift", @@ -1491,7 +1491,7 @@ }, "to": [ { - "key_code": "comma" + "key_code": "return_or_enter" } ], "conditions": [ @@ -1525,7 +1525,7 @@ { "type": "basic", "from": { - "key_code": "x", + "key_code": "quote", "modifiers": { "optional": [ "shift", @@ -1537,7 +1537,7 @@ }, "to": [ { - "key_code": "tab" + "key_code": "period" } ], "conditions": [ @@ -1571,7 +1571,7 @@ { "type": "basic", "from": { - "key_code": "8", + "key_code": "semicolon", "modifiers": { "optional": [ "shift", @@ -1583,7 +1583,7 @@ }, "to": [ { - "key_code": "tab" + "key_code": "comma" } ], "conditions": [ @@ -1617,7 +1617,7 @@ { "type": "basic", "from": { - "key_code": "keypad_0", + "key_code": "x", "modifiers": { "optional": [ "shift", @@ -1629,7 +1629,7 @@ }, "to": [ { - "key_code": "insert" + "key_code": "tab" } ], "conditions": [ @@ -1663,7 +1663,7 @@ { "type": "basic", "from": { - "key_code": "keypad_1", + "key_code": "8", "modifiers": { "optional": [ "shift", @@ -1675,7 +1675,7 @@ }, "to": [ { - "key_code": "end" + "key_code": "tab" } ], "conditions": [ @@ -1709,7 +1709,7 @@ { "type": "basic", "from": { - "key_code": "keypad_2", + "key_code": "keypad_0", "modifiers": { "optional": [ "shift", @@ -1721,7 +1721,7 @@ }, "to": [ { - "key_code": "down_arrow" + "key_code": "insert" } ], "conditions": [ @@ -1755,7 +1755,7 @@ { "type": "basic", "from": { - "key_code": "keypad_3", + "key_code": "keypad_1", "modifiers": { "optional": [ "shift", @@ -1767,7 +1767,7 @@ }, "to": [ { - "key_code": "page_down" + "key_code": "end" } ], "conditions": [ @@ -1801,7 +1801,7 @@ { "type": "basic", "from": { - "key_code": "keypad_4", + "key_code": "keypad_2", "modifiers": { "optional": [ "shift", @@ -1813,7 +1813,7 @@ }, "to": [ { - "key_code": "left_arrow" + "key_code": "down_arrow" } ], "conditions": [ @@ -1847,7 +1847,7 @@ { "type": "basic", "from": { - "key_code": "keypad_5", + "key_code": "keypad_3", "modifiers": { "optional": [ "shift", @@ -1893,7 +1893,7 @@ { "type": "basic", "from": { - "key_code": "keypad_6", + "key_code": "keypad_4", "modifiers": { "optional": [ "shift", @@ -1905,7 +1905,7 @@ }, "to": [ { - "key_code": "right_arrow" + "key_code": "left_arrow" } ], "conditions": [ @@ -1939,7 +1939,7 @@ { "type": "basic", "from": { - "key_code": "keypad_7", + "key_code": "keypad_5", "modifiers": { "optional": [ "shift", @@ -1951,7 +1951,7 @@ }, "to": [ { - "key_code": "home" + "key_code": "page_down" } ], "conditions": [ @@ -1985,7 +1985,7 @@ { "type": "basic", "from": { - "key_code": "keypad_8", + "key_code": "keypad_6", "modifiers": { "optional": [ "shift", @@ -1997,7 +1997,7 @@ }, "to": [ { - "key_code": "up_arrow" + "key_code": "right_arrow" } ], "conditions": [ @@ -2031,7 +2031,7 @@ { "type": "basic", "from": { - "key_code": "keypad_9", + "key_code": "keypad_7", "modifiers": { "optional": [ "shift", @@ -2043,7 +2043,7 @@ }, "to": [ { - "key_code": "page_up" + "key_code": "home" } ], "conditions": [ @@ -2077,7 +2077,7 @@ { "type": "basic", "from": { - "key_code": "keypad_period", + "key_code": "keypad_8", "modifiers": { "optional": [ "shift", @@ -2089,7 +2089,7 @@ }, "to": [ { - "key_code": "delete_or_backspace" + "key_code": "up_arrow" } ], "conditions": [ @@ -2123,7 +2123,7 @@ { "type": "basic", "from": { - "key_code": "n", + "key_code": "keypad_9", "modifiers": { "optional": [ "shift", @@ -2135,10 +2135,7 @@ }, "to": [ { - "key_code": "semicolon", - "modifiers": [ - "right_option" - ] + "key_code": "page_up" } ], "conditions": [ @@ -2172,7 +2169,7 @@ { "type": "basic", "from": { - "key_code": "slash", + "key_code": "keypad_period", "modifiers": { "optional": [ "shift", @@ -2184,10 +2181,7 @@ }, "to": [ { - "key_code": "slash", - "modifiers": [ - "right_option" - ] + "key_code": "delete_or_backspace" } ], "conditions": [ @@ -2221,20 +2215,21 @@ { "type": "basic", "from": { - "key_code": "b", + "key_code": "n", "modifiers": { "optional": [ "shift", "caps_lock", + "command", "left_option" ] } }, "to": [ { - "key_code": "b", + "key_code": "semicolon", "modifiers": [ - "left_command" + "right_option" ] } ], @@ -2269,20 +2264,21 @@ { "type": "basic", "from": { - "key_code": "c", + "key_code": "slash", "modifiers": { "optional": [ "shift", "caps_lock", + "command", "left_option" ] } }, "to": [ { - "key_code": "w", + "key_code": "slash", "modifiers": [ - "left_command" + "right_option" ] } ], diff --git a/src/json/neo2.json.js b/src/json/neo2.json.js index 83885ca07..8b8490c89 100644 --- a/src/json/neo2.json.js +++ b/src/json/neo2.json.js @@ -59,6 +59,10 @@ function rules() { { from: 'w', to: 'delete_or_backspace' }, { from: 'r', to: 'delete_forward' }, + // PC keys + { from: 'b', to: 'undo' }, + { from: 'c', to: 'insert' }, + // Neo num pad in layer 4 { from: 'm', to: 'keypad_1' }, { from: 'comma', to: 'keypad_2' }, @@ -137,9 +141,9 @@ function rules() { conditions: condition === undefined ? [isLayoutActive, ifMod4On] : [isLayoutActive, ifMod4On, condition] }), eachKey({ - fromKeys: ['b', 'c', 'a', 'g'], + fromKeys: ['a', 'g'], fromModifiers: { optional: ['shift', 'caps_lock', 'left_option'] }, - toKeys: ['b', 'w', 'left_arrow', 'right_arrow'], + toKeys: ['left_arrow', 'right_arrow'], toModifiers: ['left_command'], conditions: condition === undefined ? [isLayoutActive, ifMod4On] : [isLayoutActive, ifMod4On, condition] }),