Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Commit 6851768

Browse files
committed
✨ (keyboard) add altshift prefix support
#230
1 parent 71ce048 commit 6851768

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/assets/css/keyboard.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ div.keyboard_key > h3 {
120120
right: 0.278vh;
121121
}
122122

123+
div.keyboard_key > h5 {
124+
top: 0.278vh;
125+
right: 0.278vh;
126+
}
127+
123128
div.keyboard_key > h4, div.keyboard_row > .keyboard_key:last-child > *:not(h1), div.keyboard_row > .keyboard_key:first-child > *:not(h1) {
124129
opacity: 0;
125130
position: absolute;

src/classes/keyboard.class.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class Keyboard {
2727
key.innerHTML = `<h1>${keyObj.name}</h1>`;
2828
} else {
2929
key.innerHTML = `
30+
<h5>${keyObj.altshift_name || ""}</h5>
3031
<h4>${keyObj.fn_name || ""}</h4>
3132
<h3>${keyObj.alt_name || ""}</h3>
3233
<h2>${keyObj.shift_name || ""}</h2>
@@ -159,6 +160,7 @@ class Keyboard {
159160
if (container.dataset.isShiftOn === "true" && key.dataset.shift_cmd || container.dataset.isCapsLckOn === "true" && key.dataset.shift_cmd) cmd = key.dataset.capslck_cmd || key.dataset.shift_cmd;
160161
if (container.dataset.isCtrlOn === "true" && key.dataset.ctrl_cmd) cmd = key.dataset.ctrl_cmd;
161162
if (container.dataset.isAltOn === "true" && key.dataset.alt_cmd) cmd = key.dataset.alt_cmd;
163+
if (container.dataset.isAltOn === "true" && container.dataset.isShiftOn === "true" && key.dataset.altshift_cmd) cmd = key.dataset.altshift_cmd;
162164
if (container.dataset.isFnOn === "true" && key.dataset.fn_cmd) cmd = key.dataset.fn_cmd;
163165

164166
if (container.dataset.isNextCircum === "true") {

0 commit comments

Comments
 (0)