2
0
mirror of https://github.com/OrbTools/OrbCommon synced 2024-11-16 06:12:52 +00:00

simplify hid management

This commit is contained in:
Minizbot2012 2021-07-24 02:58:22 -04:00
parent 3447f9acb2
commit e3767b08b0
No known key found for this signature in database
GPG Key ID: 977C8ADE12361917

View File

@ -32,19 +32,6 @@ var file []byte
func init() {
json.Unmarshal(file, &Mappings)
}
func GetWindowsFromHid(uv uint16) uint16 {
return Mappings.Usb[uv].Win
}
func GetHidFromWindows(uv uint16) uint16 {
return Mappings.Win[uv].Usb
}
func GetLinuxFromHid(uv uint16) uint16 {
return Mappings.Usb[uv].Evdev
}
func GetHidFromLinux(uv uint16) uint16 {
return Mappings.Evdev[uv].Usb
}
func GetMappingFromHID(uv uint16) Key {
return Mappings.Usb[uv]
@ -61,3 +48,7 @@ func GetMappingFromLinux(uv uint16) Key {
func GetMappingFromName(name string) Key {
return Mappings.Code[name]
}
func GetMappingFromX(code uint16) Key {
return Mappings.Xkb[code]
}