From 265c8bbcaf461d8cb1cf41f97ae2183e1f237f13 Mon Sep 17 00:00:00 2001 From: Tom Whiston Date: Mon, 3 Jul 2023 20:51:22 +0100 Subject: [PATCH] fix: full working windows config as default (#10) * fix: full working windows config as default altgr and option are not available on all windows machines use ctrl as the default and shift as modifier * ci: remove ridiculous line length rules --- commitlint.config.js | 16 ++++- misc/replkeys.json | 158 ++++++++++++++++++++++++++++++++++++------- 2 files changed, 150 insertions(+), 24 deletions(-) diff --git a/commitlint.config.js b/commitlint.config.js index 28fe5c5..8769b87 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1 +1,15 @@ -module.exports = {extends: ['@commitlint/config-conventional']} +module.exports = { + extends: [ + '@commitlint/config-conventional' + ], + rules: { + 'body-max-length': [0, 'always'], + 'body-max-line-length': [0, 'always'], + 'footer-max-length': [0, 'always'], + 'footer-max-line-length': [0, 'always'], + 'header-max-length': [0, 'always'], + 'scope-max-length': [0, 'always'], + 'subject-max-length': [0, 'always'], + 'type-max-length': [0, 'always'], + }, +}; \ No newline at end of file diff --git a/misc/replkeys.json b/misc/replkeys.json index 577ec8c..54cefb4 100644 --- a/misc/replkeys.json +++ b/misc/replkeys.json @@ -10,31 +10,38 @@ }, "bindings": [ { - "id": "execute", + "id": "execute-opt+enter-mac", "asciiCode": 2044, "functions": [ "return ['run']" ] }, { - "id": "execute-line", + "id": "execute-ctrl+enter-win", + "asciiCode": 4348, + "functions": [ + "return ['run']" + ] + }, + { + "id": "execute_line+ctrl+opt+enter-mac", "asciiCode": 6140, "functions": [ "return ['run_line']" ] }, { - "id": "alphahandler", - "asciiCode": 127, + "id": "execute_line+shift+ctrl+enter-win", + "asciiCode": 4860, "functions": [ - "ctx.addChar(k)" + "return ['run_line']" ] }, { - "id": "ephemeral_mode-alt-g", - "asciiCode": 169, + "id": "alphahandler", + "asciiCode": 127, "functions": [ - "return ['ephemeral_mode']" + "ctx.addChar(k)" ] }, { @@ -94,54 +101,103 @@ ] }, { - "id": "comment-alt-/", + "id": "comment-opt+/-mac", "asciiCode": 247, "functions": [ "ctx.commentLine()" ] }, { - "id": "clear-alt-z", + "id": "comment-ctrl+/-win", + "asciiCode": 4399, + "functions": [ + "ctx.commentLine()" + ] + }, + { + "id": "clear-opt+z-mac", "asciiCode": 937, "functions": [ "ctx.clear()" ] }, { - "id": "cutLine-alt-x", + "id": "clear-ctrl+z-win", + "asciiCode": 4474, + "functions": [ + "ctx.clear()" + ] + }, + { + "id": "cutLine-opt+x-mac", "asciiCode": 8776, "functions": [ "ctx.tb.pasteBinCopyLine(ctx.c.line());ctx.deleteLine();return ['output_paste_bin']" ] }, { - "id": "copyLine-alt-c", + "id": "cutLine-ctrl+x-win", + "asciiCode": 4472, + "functions": [ + "ctx.tb.pasteBinCopyLine(ctx.c.line());ctx.deleteLine();return ['output_paste_bin']" + ] + }, + { + "id": "copyLine-opt+c-mac", "asciiCode": 231, "functions": [ "ctx.tb.pasteBinCopyLine(ctx.c.line());return ['output_paste_bin']" ] }, { - "id": "copyAll-alt-k", + "id": "copyLine-ctrl+c-win", + "asciiCode": 4451, + "functions": [ + "ctx.tb.pasteBinCopyLine(ctx.c.line());return ['output_paste_bin']" + ] + }, + { + "id": "copyAll-opt+k-mac", "asciiCode": 730, "functions": [ "ctx.tb.pasteBinCopyAll();return ['output_paste_bin']" ] }, { - "id": "paste-alt-v", + "id": "copyAll-ctrl+k-win", + "asciiCode": 4459, + "functions": [ + "ctx.tb.pasteBinCopyAll();return ['output_paste_bin']" + ] + }, + { + "id": "paste-opt+v-mac", "asciiCode": 8730, "functions": [ "var pb = ctx.tb.pasteBinGet(); for(var i = 0; i < pb.length; i++){for (var a = 0; a < pb[i].length; a++) {var char = pb[i].charCodeAt(a); ctx.keyPress(char)}};" ] }, { - "id": "replaceLine-alt-p", + "id": "paste-ctrl+v-win", + "asciiCode": 4470, + "functions": [ + "var pb = ctx.tb.pasteBinGet(); for(var i = 0; i < pb.length; i++){for (var a = 0; a < pb[i].length; a++) {var char = pb[i].charCodeAt(a); ctx.keyPress(char)}};" + ] + }, + { + "id": "replaceLine-opt+p-mac", "asciiCode": 960, "functions": [ "var pb = ctx.tb.pasteBinGet(); var startLine = ctx.c.line(); ctx.deleteLine(); if(ctx.c.line() < ctx.tb.length()-1){ctx.jumpLine(-1);ctx.jumpTo(1);} if(startLine === 0){ctx.jumpTo(0); ctx.newLine(); ctx.jumpTo(2); }else { ctx.newLine(); } for(var i = 0; i < pb.length; i++){for (var a = 0; a < pb[i].length; a++) {var char = pb[i].charCodeAt(a); ctx.keyPress(char)}}" ] }, + { + "id": "replaceLine-ctrl+p-win", + "asciiCode": 4464, + "functions": [ + "var pb = ctx.tb.pasteBinGet(); var startLine = ctx.c.line(); ctx.deleteLine(); if(ctx.c.line() < ctx.tb.length()-1){ctx.jumpLine(-1);ctx.jumpTo(1);} if(startLine === 0){ctx.jumpTo(0); ctx.newLine(); ctx.jumpTo(2); }else { ctx.newLine(); } for(var i = 0; i < pb.length; i++){for (var a = 0; a < pb[i].length; a++) {var char = pb[i].charCodeAt(a); ctx.keyPress(char)}}" + ] + }, { "id": "up", "asciiCode": -9, @@ -171,46 +227,102 @@ ] }, { - "id": "jump-top-alt-up", + "id": "jump_top-opt+up-mac", "asciiCode": 2039, "functions": [ "ctx.jumpTo(2)" ] }, { - "id": "jump-bottom-alt-down", + "id": "jump_top-ctrl+up-win", + "asciiCode": 4343, + "functions": [ + "ctx.jumpTo(2)" + ] + }, + { + "id": "jump_bottom-opt+down-mac", "asciiCode": 2038, "functions": [ "ctx.jumpTo(3)" ] }, { - "id": "jump-begin-alt-left", + "id": "jump_bottom-opt+down-win", + "asciiCode": 4342, + "functions": [ + "ctx.jumpTo(3)" + ] + }, + { + "id": "jump_startline-opt+left-mac", "asciiCode": 2037, "functions": [ "ctx.jumpTo(0)" ] }, { - "id": "jump-end-alt-right", + "id": "jump_startline-ctrl+left-win", + "asciiCode": 4341, + "functions": [ + "ctx.jumpTo(0)" + ] + }, + { + "id": "jump_endline-opt+right-mac", "asciiCode": 2036, "functions": [ "ctx.jumpTo(1)" ] }, { - "id": "jumpWord-left-cmd-left", - "asciiCode": 8804, + "id": "jump_endline-ctrl+right-win", + "asciiCode": 4340, + "functions": [ + "ctx.jumpTo(1)" + ] + }, + { + "id": "jumpWord_left-cmd+left-mac", + "asciiCode": 245, + "functions": [ + "ctx.jumpWord(-1)" + ] + }, + { + "id": "jumpWord_left-ctrl+shift+left-win", + "asciiCode": 4853, "functions": [ "ctx.jumpWord(-1)" ] }, { - "id": "jumpWord-right-cmd-right", - "asciiCode": 8805, + "id": "jumpWord_right-cmd+right-mac", + "asciiCode": 244, + "functions": [ + "ctx.jumpWord(1)" + ] + }, + { + "id": "jumpWord_right-ctrl+shift+right-win", + "asciiCode": 4852, "functions": [ "ctx.jumpWord(1)" ] + }, + { + "id": "ephemeral_mode-opt+g-mac", + "asciiCode": 169, + "functions": [ + "return ['ephemeral_mode']" + ] + }, + { + "id": "ephemeral_mode-ctrl+g-win", + "asciiCode": 4455, + "functions": [ + "return ['ephemeral_mode']" + ] } ] } \ No newline at end of file