on main help sign in
feat: advanced keyboard
commitd957f5d2821aae1a4e7ad9eb47c4b04c20050815 authorKujtim Hoxha <kujtimii.h@gmail.com> dateMon 16 Jun 2025, 11:06 (1 year ago) parent2b3fbe6
4 files changed+14−9
cmd/root.go+2 go.mod+4−7 go.sum−2 internal/tui/tui.go+8
cmd/root.go+2
@@ -117,6 +117,8 @@ to assist developers in writing, debugging, and understanding code directly from
117117 program := tea.NewProgram(
118118 tui.New(app),
119119 tea.WithAltScreen(),
120+ tea.WithKeyReleases(),
121+ tea.WithUniformKeyLayout(),
120122 )
121123
122124 // Setup the subscriptions, this will send services events to the TUI
go.mod+4−7
@@ -38,13 +38,6 @@ require (
3838 github.com/stretchr/testify v1.10.0
3939)
4040
41−require (
42− github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
43− github.com/disintegration/gift v1.1.2 // indirect
44− github.com/dustin/go-humanize v1.0.1 // indirect
45− github.com/mattn/go-isatty v0.0.20 // indirect
46−)
47−
4841require (
4942 cloud.google.com/go v0.116.0 // indirect
5043 cloud.google.com/go/auth v0.13.0 // indirect
@@ -68,6 +61,7 @@ require (
6861 github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.4 // indirect
6962 github.com/aws/aws-sdk-go-v2/service/sts v1.30.3 // indirect
7063 github.com/aws/smithy-go v1.20.3 // indirect
64+ github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
7165 github.com/aymerick/douceur v0.2.0 // indirect
7266 github.com/charmbracelet/colorprofile v0.3.1 // indirect
7367 github.com/charmbracelet/x/cellbuf v0.0.14-0.20250516160309-24eee56f89fa // indirect
@@ -76,7 +70,9 @@ require (
7670 github.com/charmbracelet/x/term v0.2.1 // indirect
7771 github.com/charmbracelet/x/windows v0.2.1 // indirect
7872 github.com/davecgh/go-spew v1.1.1 // indirect
73+ github.com/disintegration/gift v1.1.2 // indirect
7974 github.com/dlclark/regexp2 v1.11.4 // indirect
75+ github.com/dustin/go-humanize v1.0.1 // indirect
8076 github.com/felixge/httpsnoop v1.0.4 // indirect
8177 github.com/go-logr/logr v1.4.2 // indirect
8278 github.com/go-logr/stdr v1.2.2 // indirect
@@ -91,6 +87,7 @@ require (
9187 github.com/inconshreveable/mousetrap v1.1.0 // indirect
9288 github.com/kylelemons/godebug v1.1.0 // indirect
9389 github.com/lucasb-eyer/go-colorful v1.2.0
90+ github.com/mattn/go-isatty v0.0.20 // indirect
9491 github.com/mattn/go-runewidth v0.0.16 // indirect
9592 github.com/mfridman/interpolate v0.0.2 // indirect
9693 github.com/microcosm-cc/bluemonday v1.0.27 // indirect
go.sum−2
@@ -70,8 +70,6 @@ github.com/charlievieth/fastwalk v1.0.11 h1:5sLT/q9+d9xMdpKExawLppqvXFZCVKf6JHnr
7070github.com/charlievieth/fastwalk v1.0.11/go.mod h1:yGy1zbxog41ZVMcKA/i8ojXLFsuayX5VvwhQVoj9PBI=
7171github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250607113720-eb5e1cf3b09e h1:99Ugtt633rqauFsXjZobZmtkNpeaWialfj8dl6COC6A=
7272github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250607113720-eb5e1cf3b09e/go.mod h1:6HamsBKWqEC/FVHuQMHgQL+knPyvHH55HwJDHl/adMw=
73−github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.3.0.20250602154956-43689cfc0174 h1:TlVW+df0rdU/osP0O8DIVS9WFOAzXe3nuiMwJR4n+CA=
74−github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.3.0.20250602154956-43689cfc0174/go.mod h1:oOn1YZGZyJHxJfh4sFAna9vDzxJRNuErLETr/lnlB/I=
7573github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.3.0.20250609143341-c76fa36f1b94 h1:QIi50k+uNTJmp2sMs+33D1m/EWr/7OPTJ8x92AY3eOc=
7674github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.3.0.20250609143341-c76fa36f1b94/go.mod h1:oOn1YZGZyJHxJfh4sFAna9vDzxJRNuErLETr/lnlB/I=
7775github.com/charmbracelet/colorprofile v0.3.1 h1:k8dTHMd7fgw4bnFd7jXTLZrSU/CQrKnL3m+AxCzDz40=
internal/tui/tui.go+8
@@ -90,6 +90,14 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
9090 var cmd tea.Cmd
9191
9292 switch msg := msg.(type) {
93+ case tea.KeyboardEnhancementsMsg:
94+ logging.Info(
95+ "Keyboard enhancements detected",
96+ "Disambiguation", msg.SupportsKeyDisambiguation(),
97+ "ReleaseKeys", msg.SupportsKeyReleases(),
98+ "UniformKeys", msg.SupportsUniformKeyLayout(),
99+ )
100+ return a, nil
93101 case tea.WindowSizeMsg:
94102 return a, a.handleWindowResize(msg)
95103