add "inputs" page

Signed-off-by: Hadi <[email protected]>
This commit is contained in:
Hadi
2026-08-13 17:59:03 +02:00
parent df530f39b0
commit 6e4f8b889c
23 changed files with 1047 additions and 2 deletions
+22
View File
@@ -0,0 +1,22 @@
package keys
import (
"charm.land/bubbles/v2/key"
"github.com/anotherhadi/settuings/internal/config"
)
type InputKeyMap struct {
Select key.Binding
Reset key.Binding
}
func newInputKeyMap(cfg config.InputKeys) InputKeyMap {
return InputKeyMap{
Select: binding(cfg.Select, "apply layout"),
Reset: binding(cfg.Reset, "reset to config"),
}
}
func (i InputKeyMap) Bindings() []key.Binding {
return []key.Binding{i.Select, i.Reset}
}
+2
View File
@@ -14,6 +14,7 @@ type KeyMap struct {
Bluetooth BluetoothKeyMap
Audio AudioKeyMap
Power PowerKeyMap
Input InputKeyMap
}
var Keys *KeyMap
@@ -27,6 +28,7 @@ func Init(cfg *config.Config) {
Bluetooth: newBluetoothKeyMap(kb.Bluetooth),
Audio: newAudioKeyMap(kb.Audio),
Power: newPowerKeyMap(kb.Power),
Input: newInputKeyMap(kb.Input),
}
}