After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 676494 - Default Shift+1, 2, 3, etc, keyboard shortcuts not working
Default Shift+1, 2, 3, etc, keyboard shortcuts not working
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Input Methods
2.24.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 711702 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-05-21 12:54 UTC by Bruce
Modified: 2018-05-02 15:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bruce 2012-05-21 12:54:51 UTC
There are several keyboard shortcuts for zooming that use Shift+ a number. E.g. One is Shift+2, Shift+3. These are the defaults.

These don't work for me whether I use my number keys (row above keyboard), or the numb pad (keys to right side). When I reassign one of the zoom functions to "Shift+2", the new shortcut shows up as "@" (i.e. an at symbol instead of "Shift+2") and the shortcut works.
Comment 1 André Klapper 2012-05-21 13:49:35 UTC
Which keyboard layout is this about?
Comment 2 Bruce 2012-05-21 15:57:31 UTC
My keyboard layout is QWERTY, if that's what you meant.
Comment 3 André Klapper 2012-05-21 16:22:37 UTC
That means US? Or british? :)
Comment 4 Michael Schumacher 2012-05-21 16:23:14 UTC
Multiple countries use Qwerty, and there may be other special settings involved - see http://en.wikipedia.org/wiki/Keyboard_layout

Please describe everything you can think of that would make your keyboard setup special.
Comment 5 Bruce 2012-05-21 17:55:30 UTC
I have a PS2 keyboard plugged into my laptop (I tried using the laptop keyboard; same thing happened).

I looked at the Wikipedia article; I think I have a keyboard with a US layout, with a numbpad (as part of the keyboard). 

It looks similar to this:
http://www.dyslexic.com/mmDYSLEXIC/Images/w_optical-desktopPro_a.jpg

The thing that struck me as unusual was that it registered an "@" symbol for Shift+2, instead of registering the Shift+2. In general it seems to register other strokes like Shift+Ctrl+E.
Comment 6 Michael Natterer 2012-08-04 00:46:44 UTC
Indeed, most likely my fault because I changed quite some stuff around
accelerators in GTK+.
Comment 7 Michael Natterer 2013-11-09 22:08:22 UTC
*** Bug 711702 has been marked as a duplicate of this bug. ***
Comment 8 programmer_ceds 2013-12-21 17:40:27 UTC
Perhaps this should be reported as a separate minor bug but could perhaps be tidied up at the same time - the short-cuts for "Tools/Decrease Value 2 More" and "Tools/Increase Value 2 More" don't work for me when set to the default settings of "Shift [" and "Shift ]". On my keyboard "Shift [" is "{" - setting "{" (or "Ctrl {" or "Alt {") works without a problem. Given that the short-cut for "Tools/Decrease Value 1 More" is "Ctrl <" perhaps "Ctrl [" might be appropriate for "Decrease Value 2 More"?
Comment 9 strata_ranger 2014-05-26 12:15:47 UTC
Is bug #677707 a duplicate of this one?  It's recently popped up on the mailing list and occurs under (e.g.) freeBSD and win32 builds of GIMP 2.8 .

It seems to only affect keys whose logical ASCII character differs other than by case ( 1234567890-=[];',./ vs. ~!@#$%^&*()_+{}:"<>? ) , as if GIMP is trapping the shortcut based on its logical character instead of the actual key scan code.  It does NOT occur with letter keys (e.g. I have Paintbrush mapped to B and Bucket Fill mapped to Shift+B and they work just fine).
Comment 10 Michael Natterer 2014-08-18 01:12:25 UTC
It's GTK+ doing that, not GIMP.
Comment 11 Michael Natterer 2014-08-18 01:12:49 UTC
The same problem exists in GTK+ 3.x
Comment 12 Olliver Schinagl 2014-09-29 07:21:13 UTC
Not sure if this belongs here, or a new bug should be filed, as this is about the cosmetic part on this bug.

I have setup some keyboard shortcuts (meta + shift + 4 for example) and it works as expected, however the UI 'shows' it as 'meta + shift + $'. This is incorrect however. It should be either 'meta + shift + 4' or 'meta + $'. I understand where the bug comes from, it prints that the meta modifier is used, the shift modified is used and the character that's being used, which is shift + 4, or $.

For users however it makes more sense that the shifted character is represented in the UI without the shift modifier. When I press 'shift + 4' as a keyboard shortcut, I expect it to be displayed as its components, rather then the resulting character, confusingly prefixed with the notion that the shift metakey has been pressed.
Comment 13 Michael Natterer 2014-09-29 20:04:32 UTC
It doesn't belong here (it's a separare issue) and I'm sure there is
a bug about this against GTK+ (GIMP doesn't handle that itself), but
I don't find that bug or I would refer you to it...
Comment 14 Olliver Schinagl 2014-09-30 06:20:21 UTC
Gimp? The product here says gtk+

I did try to find it, but could not find it either. I will open a seperate issue for this.
Comment 15 Michael Natterer 2014-09-30 07:44:16 UTC
Oh, I was in the wrong bug :)
Comment 16 OldOllie 2016-08-29 21:41:27 UTC
It's been more than 4 years, and this problem has not been fixed. Is there any plan to fix it? If not, is it possible to save the zoom factor when saving the file? I'm working on making a simple GIF animation, and I spend several minutes each session using the mouse to pull down the menu to change the zoom for each file to get all the frames to fit on screen at the same time.
Comment 17 Olliver Schinagl 2016-08-30 09:56:57 UTC
Well afaik, the 'bug' is purely cosmetic, a paper-cut if you will. It's a bug that should be fixed, but the impact is very minimal imo, as it is only about the displaying of the kye in the UI.
Comment 18 Michael Natterer 2016-08-30 12:15:04 UTC
Actually, it isn't, the shortcuts are displayed, but don't work.
Comment 19 strata_ranger 2016-09-04 02:36:50 UTC
IIRC there is a workaround using the numeric keypad instead of the number row...?

Otherwise, all you can do is manually remap the key to however GIMP / GTK is receiving it.

(Sidenote: I run GIMP on a laptop whose keyboard does not include a numeric keypad, so workaround #1 simply does not apply.)
Comment 20 OldOllie 2016-09-04 06:31:55 UTC
@ Olliver Schinagl It's not about displaying the key command. It does display the key command, but the command simply does nothing. This may be of minimal impact to you, but it wastes a lot of my time. I'm working on a GIF animation, and I have to use the mouse to do this several times each session for each and every frame. 

@strata_ranger Neither the keypad nor the number row works for zoom factors smaller than 1. I've tried every possible combination using <Shift>, <Ctrl>, and <Alt>, and nothing works. 

I can't see how it would help to map a different keystroke to a nonworking command. The only way I have found to zoom to, say, 50%, is to use the mouse: View > Zoom > 1:2 (50%). The menu lists the keyboard shortcut as Shift+2, but as stated earlier, that doesn't work. 

This really is a bug in the program code that needs to be fixed.
Comment 21 programmer_ceds 2016-09-04 08:27:31 UTC
Shift 2 on (most?) keyboards gives the " (double quote character) - edit the short cut for the command from Shift+2 to " and it will just work (at least it does on the laptop where I have just tried it). Similarly for the other 1:n commands.

This is the same problem as I noted in comment 8 earlier in this thread. I would consider that this wasn't a problem in the program code but an error in the assignment of the short-cut key codes. You would normally not expect to see shift+2 instead of "

Control+Alt+2 also works (if you want to use more fingers) - just don't involve the shift key in any short-cut (apart perhaps from those that use alpha keys (A..Z)).

So I would suggest that any default short-cuts that involve the shift key (for non-alpha keys?) are edited in an up-coming release of GIMP; in the meantime just manually change the short-cut assignments for any of the affected keys that you use. Hope that this saves you much mouse work.
Comment 22 strata_ranger 2016-09-04 18:42:48 UTC
^ Actually, on most (e.g. US qwerty) keyboards Shift+2 produces an @ symbol; it's Shift+' that produces ".

But otherwise, again, just go to your Keyboard Shortcuts settings and manually remap the keys, then they will work again.

Sidenote, key shortcuts are saved to your GIMP menurc file.  Look it up and you should find entries like these:

(gtk_accel_path "<Actions>/view/view-zoom-1-2" "<Shift>2")
(gtk_accel_path "<Actions>/view/view-zoom-1-4" "<Shift>3")
(gtk_accel_path "<Actions>/view/view-zoom-1-8" "<Shift>4")
(gtk_accel_path "<Actions>/view/view-zoom-1-16" "<Shift>5")

Those are the default settings (which don't work), but once you've remapped the keys and saved settings, those same entries are now this:

(gtk_accel_path "<Actions>/view/view-zoom-1-2" "at")
(gtk_accel_path "<Actions>/view/view-zoom-1-4" "numbersign")
(gtk_accel_path "<Actions>/view/view-zoom-1-8" "dollar")
(gtk_accel_path "<Actions>/view/view-zoom-1-16" "percent")

So we can see that this isn't "just a display issue", GTK is in fact not receiving the keystroke correctly so the default mappings (albeit technically correct) are never actually recognized as such.
Comment 23 programmer_ceds 2016-09-04 21:57:03 UTC
As a work-around each GIMP user who needs short-cuts that involve the shift key being combined with a non-alpha keys can edit the keys that they wish to use but this doesn't seem like a professional approach.

Would it be possible to have GTK recognised that entries such as "<Shift>2" need to be interpreted based on the selected keyboard? The user would then still see Shift+2 displayed as the short-cut in the menu and could press the shift key and the 2 key without having to consider what character would normally result from this key combination.
Comment 24 Olliver Schinagl 2016-09-12 11:10:54 UTC
(In reply to OldOllie from comment #20)
> @ Olliver Schinagl It's not about displaying the key command. It does
> display the key command, but the command simply does nothing. This may be of
> minimal impact to you, 
> 
then I missunderstood, as the keybindings work just fine for me, except them being displayed oddly. Sorry for misunderstanding.
Comment 25 OldOllie 2016-09-12 18:47:55 UTC
(In reply to Olliver Schinagl from comment #24)

No, problem, Olliver. I was able to complete the task using the mouse to zoom out; it just took a bit longer. At least I can still use the keyboard to zoom to 100% or larger. I still have a couple of dozen more illustrations to do, though, so a quick resolution by the developers would be most appreciated. 

BTW, I'm using a 20-year-old standard PS/2 AT keyboard, so there's nothing exotic about it.
Comment 26 programmer_ceds 2016-09-12 21:35:50 UTC
(In reply to OldOllie from comment #25)
> (In reply to Olliver Schinagl from comment #24)
> 
> No, problem, Olliver. I was able to complete the task using the mouse to
> zoom out; it just took a bit longer. At least I can still use the keyboard
> to zoom to 100% or larger. I still have a couple of dozen more illustrations
> to do, though, so a quick resolution by the developers would be most
> appreciated. 
> 
> BTW, I'm using a 20-year-old standard PS/2 AT keyboard, so there's nothing
> exotic about it.

"I can't see how it would help to map a different keystroke to a nonworking command. The only way I have found to zoom to, say, 50%, is to use the mouse: View > Zoom > 1:2 (50%). The menu lists the keyboard shortcut as Shift+2, but as stated earlier, that doesn't work. "

Your "quick resolution" (at least for the short-term) was provided for you in comments posted above on the 4th of September!

To spell it out - just follow these steps:

1. Activate GIMP
2. In the menus - "Edit/Keyboard Shortcuts"
3. Expand the "View" section
4. Scroll down to the "1:2 (50%)" command and left-click on it
5. Hold down the Shift key and then press the 2 key - the short-cut will now show whatever character you get when you hold down shift and 2 (and the View/Zoom 1:2 menu will show this character).

Now when you want to zoom to 50% just hold down Shift and press 2.

Make similar edits to the 1:4, 1:8 and 1:16 short-cuts.

"This really is a bug in the program code that needs to be fixed."
No, this is an error (or perhaps an improperly thought through idea) in the allocation of the short-cut keys as noted above.

The point is that it is easy to configure the short-cut keys to do exactly what you want - all 4 of these 1:n short-cuts can be configured in this way in a much shorter time than it has taken me to type this!
Comment 27 strata_ranger 2016-09-13 00:24:09 UTC
> so a quick resolution by the developers would be most appreciated. 

Unless we're talking geological timescales, such a thing simply does not exist.
(But seriously, folks.)

The *quickest* resolution here is to just remap the keys yourself.  I agree it's not the *best* solution, but it *works*, and then you'll have working shortcut keys like you want.
Comment 28 Matthias Clasen 2018-02-10 04:59:07 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 29 strata_ranger 2018-02-12 03:40:38 UTC
Cannot say whether it still occurs with current GTK+, particularly the 3.x branch as GIMP is still bundled with GTK+2.x in releases.

But given that GIMP effectively ships with some broken default shortcuts (see comment #22) I would say yes it is still relevant to GIMP, even with a functioning workaround available (remap those shortcuts manually, then they work).
Comment 30 Michael Natterer 2018-02-12 11:30:34 UTC
Yes this still happens with GTK+ 3.x, reopening.
Comment 31 GNOME Infrastructure Team 2018-05-02 15:25:32 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/395.