diff --git a/public/json/shift_on_hold_space.json b/public/json/shift_on_hold_space.json new file mode 100644 index 000000000..5c4a1d046 --- /dev/null +++ b/public/json/shift_on_hold_space.json @@ -0,0 +1,41 @@ +{ + "title": "Shift on hold space, space on tap", + "rules": [ + { + "description": "Change space to left shift if held and space pressed alone", + "manipulators": [ + { + "conditions": [ + { + "identifiers": [ + { + "vendor_id": 1452 + } + ], + "type": "device_if" + } + ], + "from": { + "key_code": "spacebar", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "left_shift" + } + ], + "to_if_alone": [ + { + "key_code": "spacebar" + } + ], + "type": "basic" + } + ] + } + ] +} diff --git a/src/json/shift_on_hold_space.json.js b/src/json/shift_on_hold_space.json.js new file mode 100644 index 000000000..e823a4e7f --- /dev/null +++ b/src/json/shift_on_hold_space.json.js @@ -0,0 +1,37 @@ +// JavaScript should be written in ECMAScript 5.1. + +function main() { + console.log( + JSON.stringify( + { + title: 'Shift on hold space, space on tap', + rules: [ + { + description: 'Change space to left shift if held and space pressed alone', + manipulators: [ + { + conditions: [ + { + identifiers: [{ vendor_id: 1452 }], + type: 'device_if', + }, + ], + from: { + key_code: 'spacebar', + modifiers: { optional: ['any'] }, + }, + to: [{ key_code: 'left_shift' }], + to_if_alone: [{ key_code: 'spacebar' }], + type: 'basic', + }, + ], + }, + ], + }, + null, + ' ' + ) + ) +} + +main()