Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/polish-frontend' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-wh committed Dec 23, 2022
2 parents 3381a0d + 458c1b4 commit 4cfd457
Showing 1 changed file with 10 additions and 71 deletions.
81 changes: 10 additions & 71 deletions src/maps/HIDmap.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { HIDCategory } from '../enums'
import { type } from '@tauri-apps/api/os'

const os = await type()

export interface HidInfo {
HIDcode: number
Expand Down Expand Up @@ -903,40 +900,11 @@ export class Hid {
}
}
static get METAL(): HidInfo {
switch (os) {
case 'Linux':
return {
HIDcode: 227,
category: HIDCategory.Modifier,
displayString: 'L-Super',
webKeyId: 'MetaLeft'
}
break
case 'Darwin':
return {
HIDcode: 227,
category: HIDCategory.Modifier,
displayString: 'L-Command',
webKeyId: 'MetaLeft'
}
break
case 'Windows_NT':
return {
HIDcode: 227,
category: HIDCategory.Modifier,
displayString: 'L-Windows',
webKeyId: 'MetaLeft'
}
break

default:
return {
HIDcode: 227,
category: HIDCategory.Modifier,
displayString: 'L-Meta',
webKeyId: 'MetaLeft'
}
break
return {
HIDcode: 227,
category: HIDCategory.Modifier,
displayString: 'L-Meta',
webKeyId: 'MetaLeft'
}
}
static get CONTROLR(): HidInfo {
Expand Down Expand Up @@ -964,40 +932,11 @@ export class Hid {
}
}
static get METAR(): HidInfo {
switch (os) {
case 'Linux':
return {
HIDcode: 231,
category: HIDCategory.Modifier,
displayString: 'R-Super',
webKeyId: 'MetaRight'
}
break
case 'Darwin':
return {
HIDcode: 231,
category: HIDCategory.Modifier,
displayString: 'R-Command',
webKeyId: 'MetaRight'
}
break
case 'Windows_NT':
return {
HIDcode: 231,
category: HIDCategory.Modifier,
displayString: 'R-Windows',
webKeyId: 'MetaRight'
}
break

default:
return {
HIDcode: 231,
category: HIDCategory.Modifier,
displayString: 'R-Meta',
webKeyId: 'MetaRight'
}
break
return {
HIDcode: 231,
category: HIDCategory.Modifier,
displayString: 'R-Meta',
webKeyId: 'MetaRight'
}
}

Expand Down

0 comments on commit 4cfd457

Please sign in to comment.