gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Unable to switch tab using number row

Open fnuttens opened this issue 2 years ago • 3 comments

I can only switch using Tab or the numpad. I can reproduce the issue using Azerty and Optimot french layouts.

Context:

  • Windows 10
  • Windows terminal
  • GitUI Version 0.24.3

fnuttens avatar Nov 22 '23 15:11 fnuttens

hm works for me. maybe something your terminal grabbing the normal number keys? i am not on windows. hoping someone else with windows can double check

extrawurst avatar Nov 23 '23 08:11 extrawurst

Here are the logs of a short session where I try to switch to status tab 3 times using the number row and finally do it using the numpad:

07:09:28 [TRACE] (1) gitui::app: [src\app.rs:123] open repo at: RefCell { value: Path(".") }
07:09:28 [TRACE] (1) asyncgit::tags: [asyncgit\src\tags.rs:67] request
07:09:28 [TRACE] (1) gitui: [src\main.rs:216] app start: 49 ms
07:09:28 [TRACE] (1) gitui::app: [src\app.rs:497] update
07:09:28 [TRACE] (2) asyncgit::revlog: [asyncgit\src\revlog.rs:232] revlog visited: 12
07:09:28 [TRACE] (1) asyncgit::tags: [asyncgit\src\tags.rs:67] request
07:09:28 [TRACE] (1) gitui::app: [src\app.rs:400] event: Input(Resize(102, 52))
07:09:28 [TRACE] (1) gitui::app: [src\app.rs:517] update_async: Git(Branches)
07:09:28 [TRACE] (1) asyncgit::tags: [asyncgit\src\tags.rs:67] request
07:09:28 [TRACE] (1) asyncgit::tags: [asyncgit\src\tags.rs:67] request
07:09:28 [TRACE] (1) gitui::app: [src\app.rs:517] update_async: Git(Log)
07:09:28 [TRACE] (1) asyncgit::tags: [asyncgit\src\tags.rs:67] request
07:09:28 [TRACE] (1) gitui::app: [src\app.rs:517] update_async: Git(Branches)
07:09:28 [TRACE] (1) gitui::app: [src\app.rs:517] update_async: Git(Tags)
07:09:28 [TRACE] (1) asyncgit::tags: [asyncgit\src\tags.rs:67] request
07:09:28 [TRACE] (1) gitui::app: [src\app.rs:517] update_async: Git(Log)
07:09:28 [TRACE] (1) asyncgit::tags: [asyncgit\src\tags.rs:67] request
07:09:28 [TRACE] (1) gitui::app: [src\app.rs:517] update_async: Git(Tags)
07:09:28 [TRACE] (1) asyncgit::tags: [asyncgit\src\tags.rs:67] request
07:09:33 [TRACE] (1) gitui::app: [src\app.rs:400] event: Input(Key(KeyEvent { code: Char('1'), modifiers: SHIFT, kind: Press, state: NONE }))
07:09:33 [TRACE] (1) gitui::app: [src\app.rs:400] event: Input(Key(KeyEvent { code: Char('1'), modifiers: SHIFT, kind: Press, state: NONE }))
07:09:33 [TRACE] (1) gitui::app: [src\app.rs:497] update
07:09:33 [TRACE] (1) asyncgit::tags: [asyncgit\src\tags.rs:67] request
07:09:33 [TRACE] (1) gitui::app: [src\app.rs:400] event: Input(Key(KeyEvent { code: Char('1'), modifiers: SHIFT, kind: Press, state: NONE }))
07:09:36 [TRACE] (1) gitui::app: [src\app.rs:400] event: Input(Key(KeyEvent { code: Char('1'), modifiers: NONE, kind: Press, state: NONE }))
07:09:36 [TRACE] (1) asyncgit::status: [asyncgit\src\status.rs:102] request: [hash: 3163192676356602934] (type: WorkingDir)
07:09:36 [TRACE] (1) asyncgit::status: [asyncgit\src\status.rs:102] request: [hash: 16415564646765148713] (type: Stage)
07:09:36 [TRACE] (3) asyncgit::status: [asyncgit\src\status.rs:160] status fetched: 3163192676356602934 (type: WorkingDir)
07:09:36 [TRACE] (4) asyncgit::status: [asyncgit\src\status.rs:160] status fetched: 16415564646765148713 (type: Stage)
07:09:36 [TRACE] (1) gitui::app: [src\app.rs:517] update_async: Git(Status)
07:09:36 [TRACE] (1) gitui::app: [src\app.rs:517] update_async: Git(Status)
07:09:36 [TRACE] (1) gitui::app: [src\app.rs:517] update_async: Git(Branches)
07:09:38 [TRACE] (1) gitui::app: [src\app.rs:497] update
07:09:38 [TRACE] (1) asyncgit::status: [asyncgit\src\status.rs:102] request: [hash: 4296294007762834419] (type: WorkingDir)
07:09:38 [TRACE] (1) asyncgit::status: [asyncgit\src\status.rs:102] request: [hash: 14264743678350532092] (type: Stage)
07:09:38 [TRACE] (3) asyncgit::status: [asyncgit\src\status.rs:160] status fetched: 14264743678350532092 (type: Stage)
07:09:38 [TRACE] (2) asyncgit::status: [asyncgit\src\status.rs:160] status fetched: 4296294007762834419 (type: WorkingDir)
07:09:38 [TRACE] (1) gitui::app: [src\app.rs:517] update_async: Git(Status)
07:09:38 [TRACE] (1) gitui::app: [src\app.rs:517] update_async: Git(Status)
07:09:39 [TRACE] (1) gitui::app: [src\app.rs:400] event: Input(Key(KeyEvent { code: Char('q'), modifiers: NONE, kind: Press, state: NONE }))
07:09:39 [ERROR] input thread error: sending on a disconnected channel

The number row traces show the expected char with the SHIFT modifier.

fnuttens avatar Nov 24 '23 07:11 fnuttens

hm works for me. maybe something your terminal grabbing the normal number keys? i am not on windows. hoping someone else with windows can double check

Reproduced. It's not due to the terminal as it is working good when using a qwerty layout.

As @fnuttens spot it, it is because these layouts require to press the SHIFT modifier to be able to type a number. I don't know if the french layouts are the only ones working like that and so being impacted...

pmiossec avatar Jan 11 '24 10:01 pmiossec