mirror of
https://github.com/jixishi/SerialTerminalForWindowsTerminal.git
synced 2026-06-16 00:52:44 +00:00
refactor: extract internal/config and eliminate global config var
Move Config struct to internal/config with exported fields. Replace global var config with package-level cfg pointer. Add OpenLogFile to config package. Add type alias Config = appconfig.Config in main package for backward compatibility. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
func handleLocalHotkey(m *uiModel, key string) bool {
|
||||
if m.isLocalHotkey(key, "h") {
|
||||
modifier := strings.ToUpper(normalizeHotkeyPrefix(m.app.cfg.hotkeyMod))
|
||||
modifier := strings.ToUpper(normalizeHotkeyPrefix(m.app.cfg.HotkeyMod))
|
||||
m.app.ShowModal("Shortcuts", modifier+"+C => local exit\nCtrl+C => remote interrupt\n"+modifier+"+F => forward panel\n"+modifier+"+P => plugin panel\n"+modifier+"+M => mode panel\nF1 => shortcut help")
|
||||
return true
|
||||
}
|
||||
@@ -48,7 +48,7 @@ func (m *uiModel) isLocalHotkey(key, action string) bool {
|
||||
}
|
||||
}
|
||||
|
||||
mod := normalizeHotkeyPrefix(m.app.cfg.hotkeyMod)
|
||||
mod := normalizeHotkeyPrefix(m.app.cfg.HotkeyMod)
|
||||
if mod == "ctrl+shift" {
|
||||
return hasCtrl && hasShift
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user