atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.91k stars 415 forks source link

Readline shortkeys support in textarea, inputfields and co #1278

Open parisni opened 3 years ago

parisni commented 3 years ago

Could Nyxt support readline shortkeys (such ctrl-space for deleting previous word) within any HTML input text object ? That would be cool to compose messages

aartaka commented 3 years ago

Thanks for you input! It's indeed possible. We already have a limited Emacs keybingings imitation -- input-edit-mode, so there could be a readline-mimicking mode. You can try configuring it in case it'd be enough. If not -- then the remaining commands/bindings are to be written.

The question is -- does it belong to the core of Nyxt? With so much keybinding schemes of various tools, we cannot include all and every one of them. Maybe this belongs to an extension then?

aadcg commented 3 years ago

You can delete the previous word with Ctrl-backspace in most browsers, including Nyxt. The same goes for Ctrl-a, that selects the current input field or text area. Notice that these keybindings are nowhere to be found in Nyxt's source code, since they are GTK keybindings.

I think Nyxt already provides many alternatives for the task at hand. Besides inheriting GTK keybindings, there's input-edit-mode (as @aartaka mentions) and edit-with-external-editor.

parisni commented 3 years ago

the input-edit-mode looks promizing in combination with the emacs-mode. when vi-mode is activated, then the input-edit-mode goes with the vi keybinding (far from the readlines one I was looking for). apparently

parisni commented 3 years ago

any way to get those shortkey within the menu (execute command / open url) ? (similarly to emacs behavior)

Ambrevar commented 3 years ago

I'm working on it, see atlas-engineer/prompter#32 :)