charmbracelet / charmbracelet/bubbletea

ctrl+<number> not captured

Open
#1,207 3 comments 0 reactions 1 assignee Assigned to @bashbunni View on GitHub
question
Dominant language
Go
Stars
44.9k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

When pressing ctrl+ only the number is received in the `Update` method.

**To Reproduce**

```go
func (t *Model) Update(msg tea.Msg) {
switch msg := msg.(type) {
case tea.KeyMsg:
if s := msg.String(); s == "ctrl+1" {
```
When pressing Ctrl+1 and evaluating `msg.String()` it returns "1"

**Expected behavior**
When pressing Ctrl+1 and evaluating `msg.String()` it returns "ctrl+1"

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.