| | |
| | | ) |
| | | |
| | | const ( |
| | | UnsetHotkeyVK = 0 |
| | | LegacyDefaultHotkeyVK = 0xA5 |
| | | RightModifierDefaultVK = 0x5C |
| | | HotkeyModeTap = "tap" |
| | |
| | | SoundFeedback bool `json:"SoundFeedback"` |
| | | HideDockIcon bool `json:"HideDockIcon"` |
| | | CopyToClipboard bool `json:"CopyToClipboard"` |
| | | AutoPasteExperiment bool `json:"AutoPasteExperiment"` |
| | | DeviceName string `json:"DeviceName,omitempty"` |
| | | IndicatorX int `json:"IndicatorX,omitempty"` |
| | | IndicatorY int `json:"IndicatorY,omitempty"` |
| | |
| | | SoundFeedback: true, |
| | | HideDockIcon: true, |
| | | CopyToClipboard: true, |
| | | AutoPasteExperiment: false, |
| | | SelectedModelID: model.DefaultModelID, |
| | | ModelSelectionMode: ModelSelectionModeAuto, |
| | | LanguageMode: LanguageModeAuto, |
| | |
| | | } |
| | | |
| | | func defaultHotkeyVKForNewConfig(goos string) int { |
| | | if defaultHotkeyUnsetForNewConfig(goos) { |
| | | return UnsetHotkeyVK |
| | | } |
| | | switch goos { |
| | | case "darwin", "windows": |
| | | return RightModifierDefaultVK |
| | |
| | | } |
| | | } |
| | | |
| | | func IsHotkeyUnset(vk int) bool { |
| | | return vk == UnsetHotkeyVK |
| | | } |
| | | |
| | | func configPath() string { |
| | | return paths.File("config.json") |
| | | } |