Skip to content

Commit

Permalink
Merge pull request #523 from xenharmonic-devs/qwerty-package
Browse files Browse the repository at this point in the history
Split isomorphic QWERTY code to a re-usable package
  • Loading branch information
frostburn authored Jan 6, 2024
2 parents 679b3d8 + 25c002f commit 3972db2
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 320 deletions.
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"format": "prettier --write src/"
},
"dependencies": {
"isomorphic-qwerty": "^0.0.2",
"jszip": "^3.10.1",
"moment-of-symmetry": "^0.3.3",
"pinia": "^2.1.7",
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { ScaleWorkshopOneData } from '@/scale-workshop-one'
import type { Input, Output } from 'webmidi'
import { computeWhiteIndices } from '@/midi'
import { MidiIn, midiKeyInfo, MidiOut } from 'xen-midi'
import { Keyboard, type CoordinateKeyboardEvent } from '@/keyboard'
import { Keyboard, type CoordinateKeyboardEvent } from 'isomorphic-qwerty'
import { decodeQuery, encodeQuery, type DecodedState } from '@/url-encode'
import { debounce } from '@/utils'
import { version } from '../package.json'
Expand Down
4 changes: 2 additions & 2 deletions src/components/VirtualTypingKeyboard.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script setup lang="ts">
import { computed, onMounted, onUnmounted, reactive, ref } from 'vue'
import { mmod } from 'xen-dev-utils'
import type { Keyboard, CoordinateKeyboardEvent } from '@/keyboard'
import { CODES_LAYER_1 } from '@/keyboard'
import type { Keyboard, CoordinateKeyboardEvent } from 'isomorphic-qwerty'
import { CODES_LAYER_1 } from 'isomorphic-qwerty'
import { LEFT_MOUSE_BTN } from '@/constants'
/** Unimplemented features:
Expand Down
2 changes: 1 addition & 1 deletion src/keyboard-mapping.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { mmod } from 'xen-dev-utils'
import { CODES_LAYER_1 } from './keyboard'
import { CODES_LAYER_1 } from 'isomorphic-qwerty'

export const DIGIT_ROW = CODES_LAYER_1[0].slice(1) as string[]
export const QWERTY_ROW = CODES_LAYER_1[1].slice(1) as string[]
Expand Down
315 changes: 0 additions & 315 deletions src/keyboard.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/views/VirtualQwerty.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import VirtualTypingKeyboard from '@/components/VirtualTypingKeyboard.vue'
import type { Keyboard } from '@/keyboard'
import type { Keyboard } from 'isomorphic-qwerty'
import type { Scale } from 'scale-workshop-core'
type NoteOff = () => void
Expand Down

0 comments on commit 3972db2

Please sign in to comment.