mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 08:38:12 +08:00
Revamp key/code input processing which fixes Option key on Mac and other locales
Closes #742 Closes #746
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<Separator :type="'Section'" v-if="index !== 0" />
|
||||
<template v-for="hint in hintGroup" :key="hint">
|
||||
<LayoutRow v-if="hint.plus" class="plus">+</LayoutRow>
|
||||
<UserInputLabel :inputMouse="hint.mouse" :inputKeys="inputKeysForPlatform(hint)">{{ hint.label }}</UserInputLabel>
|
||||
<UserInputLabel :mouseMotion="hint.mouse" :keysWithLabelsGroups="inputKeysForPlatform(hint)">{{ hint.label }}</UserInputLabel>
|
||||
</template>
|
||||
</template>
|
||||
</LayoutRow>
|
||||
@@ -48,7 +48,7 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from "vue";
|
||||
|
||||
import { operatingSystemIsMac } from "@/utility-functions/platform";
|
||||
import { platformIsMac } from "@/utility-functions/platform";
|
||||
import { HintData, HintInfo, KeysGroup, UpdateInputHints } from "@/wasm-communication/messages";
|
||||
|
||||
import LayoutRow from "@/components/layout/LayoutRow.vue";
|
||||
@@ -64,7 +64,7 @@ export default defineComponent({
|
||||
},
|
||||
methods: {
|
||||
inputKeysForPlatform(hint: HintInfo): KeysGroup[] {
|
||||
if (operatingSystemIsMac() && hint.keyGroupsMac) return hint.keyGroupsMac;
|
||||
if (platformIsMac() && hint.keyGroupsMac) return hint.keyGroupsMac;
|
||||
return hint.keyGroups;
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user