GNOME Bugzilla – Bug 333576
PrintScreen cannot be used
Last modified: 2006-07-27 11:44:32 UTC
The keybinding applet does not allow me to use "PrintScreen" to take screenshots. An error message telling me that I need to add a modifier key appears, but this is nonsense for the PrintScreen key. This is a very serious regression... since the default IS PrintScreen, it's really strange the UI doesn't accept the default value at all...
Ubuntu bug about that: https://launchpad.net/distros/ubuntu/+source/control-center/+bug/33102 "Description of the problem: In gnome-keybinding-properties you cannot set the Pause or Print Screen keys as shortcuts (even though Take a screenshot starts out being set to Print!) Steps to reproduce: 1. Start gnome-keybinding-properties . 2. Scroll down to Take a screenshot . 3. Click on Take a screenshot and press backspace. The shortcut will be set to Disabled. 4. Click on Take a screenshot and press the Print Screen button. Expected results: Key to be assigned and Print to appear in the Shortcut column. Actual results: A warning dialog saying: 'The shortcut "Print" cannot be used because it will become unusable to type using this key. Please try with a key such as Control, Alt or Shift at the same time.' appears. Additional information: Pause suffers this problem too (I use it for Play/Pause) and if you set Shift-Pause as a keybinding then rhythmbox and totem will respond to plain unshifted Pause too."
This bug is due to the test to check if the key is in a specific range. (gnome-keybinding-properties.c:657) Here the lower and higher bound of each range: a: 97 122 A: 65 90 kana: 1185 65406 arabic: 1452 65406 serbian: 1697 1791 greek: 1953 65406 hebrew: 3295 65406 thai: 3489 3577 hangul: 65329 3834 Like PrintScreen have 65377 as value and Pause 65299, these values are rejected. I'm wondering if it's normal than some ranges are so wide (kana, arabic, greek, hebrew) and than lower bound of hangul's range is greater than its lower bound.
Created attachment 64142 [details] [review] Rework invalid keyval ranges The original code assumes that certain defines are contiguous in value, when it's far from the case (GDK_Mode_switch and its aliases, as well as GDK_Hangul_*). While this code doesn't change certain arbitrary decisions (like 'a' is bad, but '1' is fine), I think it more accurately represents what the writer of the code meant.
Ping... this bug renders the application useless. Can the patch get a review, please? Thanks.
*** Bug 343859 has been marked as a duplicate of this bug. ***
*** Bug 348819 has been marked as a duplicate of this bug. ***
The patch looks fine. I wasn't too sure where to stop for some of the character blocks. Still, it did stop people from setting 'A' as a shortcut ;) Rodrigo, Seb, could one of you push this to GNOME 2.15 and 2.14?
Ok, committed to both branches