From d9dd003b01caa4fe83e3a5fd56ce5cd878f6c591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Sat, 2 Dec 2023 23:26:04 +0100 Subject: [PATCH] feat: show warnings about shift and alt-code macros resolves #38 --- src/i18n/de/index.ts | 2 + src/i18n/en/index.ts | 2 + src/lib/assets/keymaps/ascii-macros.yml | 141 +++++++++++++++++++++++ src/lib/assets/keymaps/ascii.yml | 141 ----------------------- src/lib/components/ActionListItem.svelte | 18 +++ 5 files changed, 163 insertions(+), 141 deletions(-) create mode 100644 src/lib/assets/keymaps/ascii-macros.yml diff --git a/src/i18n/de/index.ts b/src/i18n/de/index.ts index e3c75b8d..c06e54bc 100644 --- a/src/i18n/de/index.ts +++ b/src/i18n/de/index.ts @@ -30,6 +30,8 @@ const de = { filter: { ALL: "Alle", }, + SHIFT_WARNING: "Diese Aktion hält shift", + ALT_CODE_WARNING: "Dieser Alt-Code Hack funktioniert nur unter Windows", }, share: { TITLE: "Teilen", diff --git a/src/i18n/en/index.ts b/src/i18n/en/index.ts index fe088ba8..269d07f2 100644 --- a/src/i18n/en/index.ts +++ b/src/i18n/en/index.ts @@ -29,6 +29,8 @@ const en = { filter: { ALL: "All", }, + SHIFT_WARNING: "This action holds shift", + ALT_CODE_WARNING: "This alt-code hack only works on Windows", }, share: { TITLE: "Share", diff --git a/src/lib/assets/keymaps/ascii-macros.yml b/src/lib/assets/keymaps/ascii-macros.yml new file mode 100644 index 00000000..8de7d996 --- /dev/null +++ b/src/lib/assets/keymaps/ascii-macros.yml @@ -0,0 +1,141 @@ +name: ASCII Macros +description: ASCII Characters that are macros for SHFT + key +actions: + 33: + id: "!" + title: Exclamation Point + 34: + id: '"' + title: Double Quote + 35: + id: "#" + title: Hash Symbol + 36: + id: "$" + title: Dollar Sign + 37: + id: "%" + title: Percent + 38: + id: "&" + title: Ampersand + 40: + id: "(" + title: Opening Parenthesis + 41: + id: ")" + title: Closing Parenthesis + 42: + id: "*" + title: Asterisk + 58: + id: ":" + title: Colon + 60: + id: "<" + title: Less Than + 62: + id: ">" + title: Greater Than + 63: + id: "?" + title: Question Mark + 64: + id: "@" + title: At Symbol + 65: + id: "A" + title: Uppercase A + 66: + id: "B" + title: Uppercase B + 67: + id: "C" + title: Uppercase C + 68: + id: "D" + title: Uppercase D + 69: + id: "E" + title: Uppercase E + 70: + id: "F" + title: Uppercase F + 71: + id: "G" + title: Uppercase G + 72: + id: "H" + title: Uppercase H + 73: + id: "I" + title: Uppercase I + 74: + id: "J" + title: Uppercase J + 75: + id: "K" + title: Uppercase K + 76: + id: "L" + title: Uppercase L + 77: + id: "M" + title: Uppercase M + 78: + id: "N" + title: Uppercase N + 79: + id: "O" + title: Uppercase O + 80: + id: "P" + title: Uppercase P + 81: + id: "Q" + title: Uppercase Q + 82: + id: "R" + title: Uppercase R + 83: + id: "S" + title: Uppercase S + 84: + id: "T" + title: Uppercase T + 85: + id: "U" + title: Uppercase U + 86: + id: "V" + title: Uppercase V + 87: + id: "W" + title: Uppercase W + 88: + id: "X" + title: Uppercase X + 89: + id: "Y" + title: Uppercase Y + 90: + id: "Z" + title: Uppercase Z + 94: + id: "^" + title: Caret + 95: + id: "_" + title: Underscore + 123: + id: "{" + title: Left Curly Brace + 124: + id: "|" + title: Pipe + 125: + id: "}" + title: Right Curly Brace + 126: + id: "~" + title: Tilde diff --git a/src/lib/assets/keymaps/ascii.yml b/src/lib/assets/keymaps/ascii.yml index 372b8273..fd736e74 100644 --- a/src/lib/assets/keymaps/ascii.yml +++ b/src/lib/assets/keymaps/ascii.yml @@ -7,39 +7,9 @@ actions: description: | While SPACE is used for keymaps and chord, just a " " is used in chord outputs. This action is unique in this way. Technically it is "printable", but it is not visible. - 33: - id: "!" - title: Exclamation Point - 34: - id: '"' - title: Double Quote - 35: - id: "#" - title: Hash Symbol - 36: - id: "$" - title: Dollar Sign - 37: - id: "%" - title: Percent - 38: - id: "&" - title: Ampersand 39: id: "'" title: Single Quote - 40: - id: "(" - title: Opening Parenthesis - 41: - id: ")" - title: Closing Parenthesis - 42: - id: "*" - title: Asterisk - 43: - id: "+" - title: Plus 44: id: "," title: Comma @@ -82,105 +52,12 @@ actions: 57: id: "9" title: Nine - 58: - id: ":" - title: Colon 59: id: ";" title: Semicolon - 60: - id: "<" - title: Less Than 61: id: "=" title: Equals - 62: - id: ">" - title: Greater Than - 63: - id: "?" - title: Question Mark - 64: - id: "@" - title: At Symbol - 65: - id: "A" - title: Uppercase A - 66: - id: "B" - title: Uppercase B - 67: - id: "C" - title: Uppercase C - 68: - id: "D" - title: Uppercase D - 69: - id: "E" - title: Uppercase E - 70: - id: "F" - title: Uppercase F - 71: - id: "G" - title: Uppercase G - 72: - id: "H" - title: Uppercase H - 73: - id: "I" - title: Uppercase I - 74: - id: "J" - title: Uppercase J - 75: - id: "K" - title: Uppercase K - 76: - id: "L" - title: Uppercase L - 77: - id: "M" - title: Uppercase M - 78: - id: "N" - title: Uppercase N - 79: - id: "O" - title: Uppercase O - 80: - id: "P" - title: Uppercase P - 81: - id: "Q" - title: Uppercase Q - 82: - id: "R" - title: Uppercase R - 83: - id: "S" - title: Uppercase S - 84: - id: "T" - title: Uppercase T - 85: - id: "U" - title: Uppercase U - 86: - id: "V" - title: Uppercase V - 87: - id: "W" - title: Uppercase W - 88: - id: "X" - title: Uppercase X - 89: - id: "Y" - title: Uppercase Y - 90: - id: "Z" - title: Uppercase Z 91: id: "[" title: Left Bracket @@ -190,12 +67,6 @@ actions: 93: id: "]" title: Right Bracket - 94: - id: "^" - title: Caret - 95: - id: "_" - title: Underscore 96: id: "`" title: Backtick @@ -277,18 +148,6 @@ actions: 122: id: "z" title: Lowercase z - 123: - id: "{" - title: Left Curly Brace - 124: - id: "|" - title: Pipe - 125: - id: "}" - title: Right Curly Brace - 126: - id: "~" - title: Tilde 127: id: "DEL" title: Delete diff --git a/src/lib/components/ActionListItem.svelte b/src/lib/components/ActionListItem.svelte index a3446013..8c2a7087 100644 --- a/src/lib/components/ActionListItem.svelte +++ b/src/lib/components/ActionListItem.svelte @@ -1,6 +1,7 @@