-
-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tabbing should navigate input boxes #52
Comments
Noticing this here on a machine without mouse input. Tab by itself is doing the exact same thing as Ctrl + Tab (And if you only have one tab open it does absolutely nothing) |
What terminal is this? |
I've tested browsh on a Zipit Z2 which has no mouse input (or gui for that matter) in an ash shell over SSH running inside tmux. There is no way to interface with the contents of the webpage (clicking links, input boxes, etc) solely with keyboard input. Issue is the same with gnome terminal from PC, although mouse input does work as expected. Perhaps this should be a separate issue/feature request? Some Zipit browsh screenshots https://imgur.com/a/mwzmtzX |
@tombh I've ran into the same issue on Konsole (Plasma 5) and plain TTY. |
@mozzwald!!! Wow, that's so cool :) Thanks for posting. I think you'd be better off following #31 as that's a more comprehensive solution to keyboard interaction. @parkerlreed Can you send |
@tombh I opened browsh (1.3.2) with debug, pressed Ctrl T for new tab, pressed tab by itself 6 times (switched tabs), and Ctrl Tab 6 times (also switched tabs, as expected)
|
browsh/interfacer/src/browsh/tty.go Line 78 in a43a9bd
If I'm reading that correctly, with no modifier it's sending nextTab? So Tab either by itself or with Ctrl are hitting the same case? |
OMG, yes you're right. What a silly oversight! Ok I should be able to fix this easily :D |
Any update on this? I see #31 which could work but I feel like tab should be a basic thing without having to learn a whole new set of navigation controls. |
Well I looked into fixing this and a it turns out both If this is the case what do you think could be a solution? The only one I can see at the moment is to use |
Right. There's not way to distinguish Tab and Ctrl-Tab in a TTY. Usually, the recommended work around is to tell your terminal to fire another combo on Ctrl-Tab (the terminal can catch it). So I would recommend binding Ctrl-PageUp/Down, to next/prev tab, and write a wiki page about how to make Ctrl-Tab fire a Ctrl-PageUp event. There's at least an option on Mac (iterm) and Windows (mintty). And I'm sure there are ways on Linux. |
I think @paulrouget makes the best suggestion so far. |
Only 'next-tab' is currently supported. You will need to run Browsh with `--debug` then press the key combination and watch the logs for something like; `TTY sending: /stdin,{"char":"\u001c","key":28,"mod":2}` That is the result of having `pressed CTRL+\`. Then add something like the following to your config file: ```toml [tty.keys] next-tab = ["\u001c", "28", "2"] ``` touches #52
Thanks @paulrouget I'd like to implement this. Just 1 catch though, it seems your suggested keys are generating a series of ANSI escape sequence runes instead of a single relevant event. I've submitted an issue over at tcell about it: gdamore/tcell/issues/228 I've also just pushed a commit (to be available in the next version release) that implements a very basic draft of configurable keybindings: Only 'next-tab' is currently supported. You will need to run Browsh with
That is the result of having pressed [tty.keys]
next-tab = ["\u001c", "28", "2"] |
This fixes in the previous comment were just released in v1.4.7 |
Thanks! Trying the update (1.4.8) tab does indeed not have that same behavior as before. However, I feel like the original issue (tab navigation) is still present. If I open regular Firefox and start pressing tab, I move between the elements and can hit enter to activate whatever is selected. This is completely absent in browsh. Maybe this has to share some work with the open vim bindings issue. |
Oh I thought I'd replied to this already (maybe I accidentally replied in a different thread!) But absolutely, I still need to implement the tabbing to cycle input boxes, it's a pretty fundamental behaviour, and will actually overcome one of the main difficulties of input boxes: finding where to click! |
was that ever implemented? |
Just wanted to bump the idea of using keyboard input to jump to HTML |
Show stopper for me also. Working through docker containers, mouse works sort of. |
Any update to this? |
No description provided.
The text was updated successfully, but these errors were encountered: