Skip to content

Commit

Permalink
Fixed scan codes
Browse files Browse the repository at this point in the history
  • Loading branch information
kasecato committed Jan 28, 2024
1 parent 87b27b7 commit 02d9dad
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 5 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,18 @@ shift+enter | shift+enter | Start new line | ✅
ctrl+shift+u | cmd+shift+u | Toggle case for word at caret or selected block | N/A
ctrl+shift+] | cmd+shift+] | Select till code block end | N/A
ctrl+shift+[ | cmd+shift+[ | Select till code block start | N/A
ctrl+right | alt+right | Cursor to word end | ✅
ctrl+right | alt+right | Cursor to hump end | ✅
ctrl+left | alt+left | Cursor to word start | ✅
ctrl+left | alt+left | Cursor to hump start | ✅
ctrl+shift+right | alt+shift+right | Select to word end | ✅
ctrl+shift+right | alt+shift+right | Select to hump end | ✅
ctrl+shift+left | alt+shift+left | Select to word start | ✅
ctrl+shift+left | alt+shift+left | Select to hump start | ✅
ctrl+delete | alt+delete | Delete to word end | ✅
ctrl+delete | alt+delete | Delete to hump end | ✅
ctrl+backspace | alt+backspace | Delete to word start | ✅
ctrl+backspace | alt+backspace | Delete to hump start | ✅
ctrl+. | cmd+. | Fold selection | ✅
ctrl+= | cmd+= | Expand code block | ✅
ctrl+numpad_add | cmd+numpad_add | Expand code block | ✅
Expand Down Expand Up @@ -147,8 +157,8 @@ shift+escape | shift+escape | Hide active or last active window (Problems) | ✅
shift+escape | shift+escape | Hide active or last active window (Debug Console) | ✅
shift+escape | shift+escape | Hide active or last active window (Terminal) | ✅
shift+escape | shift+escape | Hide active or last active window (Panel) | N/A
ctrl+shift+' | ctrl+cmd+' | Maximize Tool Window (Problems, Output, Debug Console, Terminal | ✅
ctrl+shift+f4 | cmd+shift+f4 | Close active run/messages/find/... tab | N/A
ctrl+shift+' | cmd+shift+' | Maximize Tool Window (Problems, Output, Debug Console, Terminal) | ✅
ctrl+g | cmd+l | Go to line | ✅
ctrl+e | cmd+e | Recent files popup | ✅
ctrl+alt+left | cmd+alt+left | Navigate back | ✅
Expand Down Expand Up @@ -280,6 +290,7 @@ alt+tab | alt+tab | Goto next splitter | ✅
shift+alt+tab | shift+alt+tab | Goto previous splitter | ✅
enter | enter | Open Highlighted File (Explorer) | ✅
alt+home | alt+home | Jump to Navigation Bar | ✅
shift+ctrl+c | shift+cmd+c | Copy paths | ✅

### CamelHumps

Expand Down
42 changes: 38 additions & 4 deletions src/tool/gene-keybind-markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ const isMacOS = (line) => line.match(/"mac": "(.*)"/) !== null;
const isCommand = (line) => line.match(/"command": "(.*)"/) !== null;
const isWhen = (line) => line.match(/"when": "(.*)"/) !== null;
const isIntelliJ = (line) => line.match(/"intellij": "(.*)"/) !== null;
const isTodo = (line) => line.match(/"todo": "(.*)"/) !== null;
const isNotebook = (line) => line.match(/"notebook": "(.*)"/) !== null;

const hasCommand = (cmnd) => cmnd !== null && cmnd !== '';

Expand All @@ -84,9 +82,45 @@ const getWindowsOrLinux = (line) => /"key": "(.*)"/.exec(line)[1];
const getMacOS = (line) => /"mac": "(.*)"/.exec(line)[1];
const getIntelliJ = (line) => /"intellij": "(.*)"/.exec(line)[1];
const getCommand = (line) => /"command": "(.*)"/.exec(line)[1];
const getTodo = (line) => /"todo": "(.*)"/.exec(line)[1];

const escape = (line) => line.replace(/([`])/, "\\$1");
const escape = (line) => line.replace(/([`])/, "\\$1")
.replace(/\[Digit(\d)\]/, '$1')
.replace(/\[F(\d{1,2})\]/, 'f$1')
.replace('[Backquote]', '`')
.replace('[Minus]', '-')
.replace('[Equal]', '=')
.replace('[BracketLeft]', '[')
.replace('[BracketRight]', ']')
.replace('[Backslash]', '\\')
.replace('[Semicolon]', ';')
.replace('[Quote]', '\'')
.replace('[Comma]', ',')
.replace('[Period]', '.')
.replace('[Slash]', '/')
.replace('[ArrowLeft]', 'left')
.replace('[ArrowUp]', 'up')
.replace('[ArrowRight]', 'right')
.replace('[ArrowDown]', 'down')
.replace('[PageUp]', 'pageup')
.replace('[PageDown]', 'pagedown')
.replace('[End]', 'end')
.replace('[Home]', 'home')
.replace('[Tab]', 'tab')
.replace('[Enter]', 'enter')
.replace('[Escape]', 'escape')
.replace('[Space]', 'space')
.replace('[Backspace]', 'backspace')
.replace('[Delete]', 'delete')
.replace('[Pause]', 'pause')
.replace('[CapsLock]', 'capslock')
.replace('[Insert]', 'insert')
.replace(/\[Numpad(\d)\]/, 'numpad$1')
.replace('[NumpadMultiply', 'numpad_multiply')
.replace('[NumpadAdd]', 'numpad_add')
.replace('[NumpadComma]', 'numpad_separator')
.replace('[NumpadSubtract]', 'numpad_subtract')
.replace('[NumpadDecimal]', 'numpad_decimal')
.replace('[NumpadDivide]', 'numpad_divide');
const available = (line) => line ? line : 'N/A';


Expand Down

0 comments on commit 02d9dad

Please sign in to comment.