diff --git a/src/App.vue b/src/App.vue index f603998f..c441d41b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -109,6 +109,8 @@ const newline = ref(UNIX_NEWLINE); const colorScheme = ref<"light" | "dark">("light"); const centsFractionDigits = ref(3); const decimalFractionDigits = ref(5); +const showVirtualQwerty = ref(false); + // Special keyboard codes also from local storage. const deactivationCode = ref("Backquote"); const equaveUpCode = ref("NumpadMultiply"); @@ -746,6 +748,9 @@ onMounted(() => { storage.getItem("decimalFractionDigits")! ); } + if ("showVirtualQwerty" in storage) { + showVirtualQwerty.value = storage.getItem("showVirtualQwerty") === "true"; + } // Fetch special key map if ("deactivationCode" in storage) { @@ -895,6 +900,9 @@ watch(centsFractionDigits, (newValue) => watch(decimalFractionDigits, (newValue) => window.localStorage.setItem("decimalFractionDigits", newValue.toString()) ); +watch(showVirtualQwerty, (newValue) => + window.localStorage.setItem("showVirtualQwerty", newValue.toString()) +); // Store keymaps watch(deactivationCode, (newValue) => window.localStorage.setItem("deactivationCode", newValue) @@ -922,6 +930,9 @@ watch(degreeDownCode, (newValue) =>
  • Build Scale
  • Analysis
  • Virtual Keyboard
  • +
  • + Virtual QWERTY +
  • Synth
  • MIDI I/O
  • Preferences
  • @@ -984,6 +995,9 @@ watch(degreeDownCode, (newValue) => :sustainLevel="sustainLevel" :releaseTime="releaseTime" :maxPolyphony="maxPolyphony" + :typingKeyboard="typingKeyboard" + :keyboardMapping="keyboardMapping" + :showVirtualQwerty="showVirtualQwerty" @update:audioDelay="audioDelay = $event" @update:mainVolume="mainVolume = $event" @update:scaleName="scaleName = $event" @@ -1008,6 +1022,7 @@ watch(degreeDownCode, (newValue) => @update:colorScheme="colorScheme = $event" @update:centsFractionDigits="centsFractionDigits = $event" @update:decimalFractionDigits="decimalFractionDigits = $event" + @update:showVirtualQwerty="showVirtualQwerty = $event" @update:deactivationCode="deactivationCode = $event" @update:equaveUpCode="equaveUpCode = $event" @update:equaveDownCode="equaveDownCode = $event" diff --git a/src/components/VirtualTypingKeyboard.vue b/src/components/VirtualTypingKeyboard.vue new file mode 100644 index 00000000..a481d0e1 --- /dev/null +++ b/src/components/VirtualTypingKeyboard.vue @@ -0,0 +1,417 @@ + + + + + diff --git a/src/router/index.ts b/src/router/index.ts index 6432376e..ce43c333 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -62,6 +62,11 @@ const router = createRouter({ name: "virtualKeyboard", component: () => import("../views/VirtualKeyboardView.vue"), }, + { + path: "/qwerty", + name: "qwerty", + component: () => import("../views/VirtualQwerty.vue"), + }, // Root aliases mainly for compatibility with old SW1 URLs. { path: "/index.html", diff --git a/src/views/PreferencesView.vue b/src/views/PreferencesView.vue index acba9e0c..6c59dbac 100644 --- a/src/views/PreferencesView.vue +++ b/src/views/PreferencesView.vue @@ -7,6 +7,7 @@ const props = defineProps<{ colorScheme: "light" | "dark"; centsFractionDigits: number; decimalFractionDigits: number; + showVirtualQwerty: boolean; }>(); const emit = defineEmits([ @@ -15,6 +16,7 @@ const emit = defineEmits([ "update:centsFractionDigits", "update:decimalFractionDigits", "update:virtualKeyboardMode", + "update:showVirtualQwerty", ]); const newline = computed({ @@ -33,6 +35,10 @@ const decimalFractionDigits = computed({ get: () => props.decimalFractionDigits, set: (newValue: number) => emit("update:decimalFractionDigits", newValue), }); +const showVirtualQwerty = computed({ + get: () => props.showVirtualQwerty, + set: (newValue: boolean) => emit("update:showVirtualQwerty", newValue), +});