GNOME Bugzilla – Bug 309300
Adjust the key binding for setting the spin box's value to the minimum or maximum
Last modified: 2016-02-24 02:26:46 UTC
Up/Down and PgUp/PgDown currently increase/decrease the value in a spin box one small and one large step. Ctrl+Home/Ctrl+End should be added as a key binding that adjusts the value in a spin box to the maximum/minimum value. The Home and End keys are normally included in key bindings that navigate to the beginning/end of data, so the proposed key bindings provide consistency with similar behaviors available in a scrolled window, list, and tree. The proposed key binding is not found in Windows. Other information:
Here's a discussion that happened today: -------------- <nekohayo> is it "expected" behavior that hitting the home/end keys while inside the entry of a spinbutton will warp that spinbutton's value to one of the two extremes of the range? It's causing problems for at least one application, where the spinbutton is used for decimal $ values. I'd like to be able to go to the beginning and end of the string, not have the number change to some random crazy big number: https://bugs.launchpad.net/homebank/+bug/1547260 <Company> https://git.gnome.org/browse/gtk+/tree/gtk/gtkspinbutton.c#n581 seems to be by design, though HOME/END is pretty new: https://git.gnome.org/browse/gtk+/commit/?id=f263c11 <nekohayo> oh so *that* is why I thought there was a regression in Homebank <Company> I think that should be reverted. HOME/END are used in text entries while page up/down aren't. Or at least they should require Ctrl <nekohayo> Exactly. I wouldn't mind if this was bound to shift (or ctrl) + home/end, but without those, currently it breaks consistency with other entry widgets ------------ So, reopening as I suppose this should be using ctrl or shift modifiers, making everyone happy (as this bug report originally intended :)
Created attachment 321784 [details] [review] Proposed patch Nevermind the idea of using the shift modifier, it would conflict with selecting from the cursor position to the beginning/end. This patch fixes the issue by using Ctrl+Home/End as originally requested.