Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .callstack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pr_review:
exclude:
- helpers/
2 changes: 1 addition & 1 deletion components/checker/CheckerCapture.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/>
</div>
<CheckerCaptureControls @input="onInputKey" />
<CheckerSearch v-if="capturedKeys.length" :query="capturedKeys" />
<CheckerSearch v-if="!!capturedKeys.length" :query="capturedKeys" />
<AppAbout />
</template>
<script setup lang="ts">
Expand Down
8 changes: 7 additions & 1 deletion helpers/shortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,16 @@ function transformKeys(keys: string[]) {
if (Object.keys(keysMap).includes(key)) {
return keysMap[key];
}
return key.toUpperCase();
return toUpperCase(key);
});
}

const toUpperCase = (key: string): string => {
const char = key.charCodeAt(0);
const upperNumber = String.fromCharCode(char - 40);
return upperNumber;
};

const MAP: Record<number, string> = {
8: "backspace",
9: "tab",
Expand Down