99 <p class =" py-4" >Be sure to backup your code if you still need any of it.</p >
1010 <div class =" flex justify-between" >
1111 <div class =" btn" >Abort</div >
12- <div class =" btn btn-warning" @click =" flashCoordMapping({overwrite: true})" >Flash POG</div >
12+ <div class =" btn btn-warning" @click =" flashCoordMapping({ overwrite: true })" >Flash POG</div >
1313 </div >
1414 </div >
1515 <form method =" dialog" class =" modal-backdrop" >
1616 <button >close</button >
1717 </form >
1818 </dialog >
1919 <div >
20- <p class =" py-4" >1. install the debug code on the keyboard</p >
20+ <p class =" py-4" >1. Install the debug code on the keyboard</p >
2121 <button class =" btn btn-primary btn-sm" @click =" promptFlashing" >
2222 Flash CoordMap Finder to keyboard
2323 </button >
2424 <div >
2525 <p class =" py-4" >2. Click the text area and follow the guide below</p >
2626
2727 <p class =" mb-4" >
28- 3. Now press each key starting in the top left corner in the first row and moving to the right
29- when you reached the end press the last key once again to start with the next row
28+ 3. Now press each key starting in the top left corner in the first row and moving to the
29+ right when you reached the end press the last key once again to start with the next row
3030 </p >
3131
32- <p class =" py-4" >if nothing is happening first replug the board in case it hasnt started and wait 5 seconds. if this did not help check the diode direction or pins.</p >
32+ <p class =" py-4" >
33+ If nothing is happening first replug the board in case it hasnt started and wait 5 seconds.
34+ If this did not help check the diode direction or pins.
35+ </p >
3336 <textarea
3437 id =" keycapture"
3538 v-model =" coordmap"
5861 <button class =" btn btn-primary mt-2" @click =" done" >
5962 {{ initialSetup ? 'next' : 'save Coord Maping & create keyboard layout' }}
6063 </button >
61- <button class =" btn-primary btn mt-2" @click =" onlySave" v-if =" !initialSetup" >
64+ <button class =" btn btn -primary mt-2" @click =" onlySave" v-if =" !initialSetup" >
6265 only save Coord Maping
6366 </button >
6467 </div >
@@ -86,12 +89,12 @@ coordmap.value = keyboardStore.coordMap
8689 .join (' row ' )
8790
8891const addRow = () => {
89- coordmap .value = coordmap .value + ' \n ' ;
90- (document .querySelector (' #keycapture' ) as HTMLInputElement ).focus ()
92+ coordmap .value = coordmap .value + ' \n '
93+ ; (document .querySelector (' #keycapture' ) as HTMLInputElement ).focus ()
9194}
9295const addSpc = () => {
93- coordmap .value += ' spc ' ;
94- (document .querySelector (' #keycapture' ) as HTMLInputElement ).focus ()
96+ coordmap .value += ' spc '
97+ ; (document .querySelector (' #keycapture' ) as HTMLInputElement ).focus ()
9598}
9699const done = () => {
97100 keyboardStore .setKeys (keyboardlayout .value as KeyInfo [])
@@ -102,20 +105,24 @@ const onlySave = () => {
102105 keyboardStore .coordMap = keys .value
103106}
104107const promptFlashing = () => {
105- if (props .initialSetup ){
108+ if (props .initialSetup ) {
106109 // after valid ok then flash file with overwrite on
107- (document .getElementById (" flash_modal" ) as HTMLDialogElement ).showModal ()
110+ ; (document .getElementById (' flash_modal' ) as HTMLDialogElement ).showModal ()
108111 } else {
109- flashCoordMapping ({overwrite: false })
112+ flashCoordMapping ({ overwrite: false })
110113 }
111114}
112- const flashCoordMapping = async ({ overwrite } : {overwrite: boolean }) => {
115+ const flashCoordMapping = async ({ overwrite }: { overwrite: boolean }) => {
113116 console .log (' flashCoordMapping with overwrite:' , overwrite )
114- keyboardStore .coordMapSetup = true ;
115- (document .getElementById (" flash_modal" ) as HTMLDialogElement ).close ()
117+ keyboardStore .coordMapSetup = true
118+ ; (document .getElementById (' flash_modal' ) as HTMLDialogElement ).close ()
116119 overwrite = Boolean (overwrite )
117120 await window .api .saveConfiguration (
118- JSON .stringify ({ pogConfig: keyboardStore .serialize (), writeFirmware: overwrite , writeCoordMapHelper: true })
121+ JSON .stringify ({
122+ pogConfig: keyboardStore .serialize (),
123+ writeFirmware: overwrite ,
124+ writeCoordMapHelper: true
125+ })
119126 )
120127}
121128const keys = computed (() => {
@@ -152,7 +159,7 @@ const coordmapstring = computed(() => {
152159 return str .replaceAll (/ spc,/ gi , ' ' )
153160})
154161const keyboardlayout = computed (() => {
155- const realKeys : Key []= []
162+ const realKeys: Key [] = []
156163 let globalkeyindex = 0
157164 keys .value .forEach ((row , rowindex ) => {
158165 row .forEach ((key , kindex ) => {
0 commit comments