Skip to content

Commit 580f300

Browse files
committed
Add q button to default toolbar row 2
1 parent d941317 commit 580f300

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ This project has not been published yet. On first release, rename this section t
3131
- Changed: Tailscale Serve guide now recommends always rebuilding the overlay before start; removed version-hash cache-key snippet to prevent stale build issues.
3232
- Changed: default toolbar now uses explicit tmux `Prefix` (`C-b`) and `Alt+Enter` buttons for more predictable mobile input.
3333
- Added: new drawer `Combo` action (`combo-picker`) that opens a small combo input modal for explicit Ctrl/Alt key sends.
34+
- Added: default toolbar `q` button (row 2, left) for quitting interactive TUIs.

‎src/config.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ const defaultRow1: WebmuxConfig['toolbar']['row1'] = [
8686

8787
/** Default row 2 buttons */
8888
const defaultRow2: WebmuxConfig['toolbar']['row2'] = [
89+
{
90+
id: 'q',
91+
label: 'q',
92+
description: 'Send q key',
93+
action: { type: 'send', data: 'q' },
94+
},
8995
{
9096
id: 'alt-enter',
9197
label: 'M-↵',

‎tests/config.test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ describe('defaultConfig', () => {
125125
expect(defaultConfig.toolbar.row1).toHaveLength(10)
126126
})
127127

128-
test('has 6 row2 buttons', () => {
129-
expect(defaultConfig.toolbar.row2).toHaveLength(6)
128+
test('has 7 row2 buttons', () => {
129+
expect(defaultConfig.toolbar.row2).toHaveLength(7)
130130
})
131131

132132
test('has 15 drawer buttons', () => {
@@ -139,9 +139,9 @@ describe('defaultConfig', () => {
139139
expect(sTabIdx).toBe(tabIdx + 1)
140140
})
141141

142-
test('row2 has Alt+Enter, C-d, More, Paste, Backspace, Space', () => {
142+
test('row2 has q, Alt+Enter, C-d, More, Paste, Backspace, Space', () => {
143143
const labels = defaultConfig.toolbar.row2.map((b) => b.label)
144-
expect(labels).toEqual(['M-↵', 'C-d', '\u2630 More', 'Paste', '⌫', 'Space'])
144+
expect(labels).toEqual(['q', 'M-↵', 'C-d', '\u2630 More', 'Paste', '⌫', 'Space'])
145145
})
146146

147147
test('font size range is [8, 32]', () => {

0 commit comments

Comments
 (0)