dillo-plus icon indicating copy to clipboard operation
dillo-plus copied to clipboard

Make CTRL+A select text in the current field

Open kuchikuu opened this issue 1 year ago • 1 comments
trafficstars

Change the default behavior of CTRL+A from moving cursor to the beginning of the line, to selecting the whole text in the current field. This is more intuitive for casual users and goes in pair with CTLR+X/C/V shortcuts.

Modified files: dw/fltkui.cc <- shortcut inside the webpage src/dialog.cc <- shortcut in a dialog (not tested) src/fidnbar.cc <- shortcut in Search field src/ui.cc <- shortcut in address bar

kuchikuu avatar Jan 10 '24 14:01 kuchikuu

Something that I wanted for a long time.

Edit: Come to think about it... To select all text in address bar, you have to press CTRL+L (again) to select all text in Find/Search bar, you have to press CTRL+F again

So I guess these two already had "select all" functionality. But there's no way (at least that I know of) to select your text inside a website (for example in input field).

Well, up to you. Making CTRL+A select it as well, makes it more intuitive (I think). Moving to the beginning of the line can also be achieved by CTRL+LeftArrow.

Edit2: Ok, I don't know how to feel about this pull request anymore It looks like there are ways to select text in a field inside a webpage. We can press CTRL+SHIFT+Home after being at the end of the input field to select the whole text.

Well, I would like to be able to select everything in a field with a quick CTRL+A, but it's up to You to decide whether you want to merge it or not.

kuchikuu avatar Jan 10 '24 14:01 kuchikuu

Hi @kuchikuu

I've evaluated multiple ways to implement this, e.g. using a config in dillorc to specify what kind of shortcuts you prefer, but thay all added a lot of complexity to the code.

I opted for a compromise, and added the shortcut Ctrl+Shift+a to select all text in the current field. The mnemonic is very similar and doesn't break anything.

Commit in dev: https://github.com/crossbowerbt/dillo-plus/commit/2a72b2d83ffa82b71618c3bb2f61327655a6bb22 Soon in main...

Thx for the suggestion

crossbowerbt avatar May 28 '24 06:05 crossbowerbt