v1cont / yad

Yet Another Dialog
GNU General Public License v3.0
654 stars 58 forks source link

[Feature Request] F2 to edit item in list #199

Closed BillyCroan closed 1 year ago

BillyCroan commented 1 year ago

when using --list with --editable you can click a list item to edit it.

Mice slow me down. Why not allow F2 to edit the currently selected line?

v1cont commented 1 year ago

just press 'space' and you activate editing mode in current cell

BillyCroan commented 1 year ago

Works a treat! Thank you! What would you think about noting this key combo in the man page for --editable to help others find it?

v1cont commented 1 year ago

actually this is a standard gtk behaivor. i don't thing i have to mention this in man page

BillyCroan commented 1 year ago

Interesting. I've been using gnome for 20 years and it was a surprise to me. https://search.brave.com/search?q=gtk+space+to+edit https://search.brave.com/search?q=gtk+space+bar+to+edit https://search.brave.com/search?q=gnome+space+bar+to+edit&source=web Doesn't seem to show up on some simple searches either.

In what other software programs have you seen this behavior of pressing the space bar to edit a field?

I checked Google sheets and LibreOffice sheets and in both of them if you arrow up or down into a cell and press the space bar, it replaces the contents of the cell with the sincle space itself.

It seems like a bad idea from Gnome, to use a printable character to enter editing mode when function keys are not printable, and F2 to edit is seen nearly universally in file managers. Space bar often means 'page down'.

I don't doubt that the space-to-edit behavior is inherited from gtk. I would believe you completely if you said you didn't write that code and it came from gtk. I think that's likely. I've just can't recall having ever seen an application use it in 20 years administering linux networks from a Gnome desktop. If it's used in Yad and nowhere else, it might merit a notice.

Hopefully this ticket, if nothing else, will help the next user searching for a keyboard key to enter edit mode on a value in a yad editable list.