| View previous topic :: View next topic |
| Author |
Message |
psylence Tux's lil' helper


Joined: 08 May 2004 Posts: 113 Location: Midwest, USA
|
Posted: Thu Apr 21, 2005 2:05 am Post subject: Binding Window-? to Lock Screen in Gnome (2.8) |
|
|
I've been fighting this since I switched to Linux months ago and I decided to crack at it again tonight...
He's the situation, the window-keys are useful, I use them for as many shortcuts as possible, and want to use Window-L as Lock Screen in Gnome. Gnome however does not want this to happen. I can bind Window-L to many other things, and it works fine, Run Application for example. But I bind Window-L to Lock Screen, doesn't work. Window-Anything to Lock Screen, doesn't work. Window-Anything to other stuff, works fine... I bind 'A' to lock screen, works perfectly. I don't get it...
I've played w/the Hyper/Meta/etc. as Win key in the Keyboard options, doesn't seem to change anything. Anyone else this picky?  |
|
| Back to top |
|
 |
GaMMa l33t


Joined: 23 Aug 2002 Posts: 684 Location: USA
|
Posted: Wed Apr 27, 2005 2:11 am Post subject: |
|
|
Same issue here, I want to bind applications to my (unused) Windows key. The run menu works fine no matter what I bind it to, but for some reason the other applications can't be binded. I have NO idea why this is happening, and it's been occuring for some time now. I'm going to try recreating my home directory and see if that solves it.
http://bugs.gentoo.org/show_bug.cgi?id=90566 I made a bug report for this bug. _________________ Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide] |
|
| Back to top |
|
 |
parsim Guru


Joined: 12 Aug 2004 Posts: 347 Location: Melbourne, Australia
|
Posted: Wed Apr 27, 2005 12:18 pm Post subject: |
|
|
Hmm, you're right! I use plenty of shortcuts using the Windows key (file manager, show desktop, change workspace), but it doesn't seem to do anything except flash the cursor when bound to "Lock Screen".
Using 2.8. |
|
| Back to top |
|
 |
GaMMa l33t


Joined: 23 Aug 2002 Posts: 684 Location: USA
|
Posted: Thu Apr 28, 2005 12:47 am Post subject: |
|
|
I can't even get it to open the file manager.... gnome 2.10 for me though. _________________ Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide] |
|
| Back to top |
|
 |
parsim Guru


Joined: 12 Aug 2004 Posts: 347 Location: Melbourne, Australia
|
Posted: Thu Apr 28, 2005 2:16 am Post subject: |
|
|
I found out some info, but it's not quite a solution.
Most of my keybindings seem to end up in the file ~/.gconf/apps/metacity/global_bindings/%gconf.xml. However, there is also a file called ~/.gconf/apps/gnome_settings_daemon/keybindings/%gconf.xml, and this is the one that contains the Lock Screen ("screensaver") function. None of the functions in that file seem to work if bound to the Windows key, although they work fine when bound to other keys. |
|
| Back to top |
|
 |
psylence Tux's lil' helper


Joined: 08 May 2004 Posts: 113 Location: Midwest, USA
|
|
| Back to top |
|
 |
parsim Guru


Joined: 12 Aug 2004 Posts: 347 Location: Melbourne, Australia
|
Posted: Thu Apr 28, 2005 4:05 am Post subject: |
|
|
| Right you are. I've posted to the Gnome bugzilla. |
|
| Back to top |
|
 |
psylence Tux's lil' helper


Joined: 08 May 2004 Posts: 113 Location: Midwest, USA
|
Posted: Thu Apr 28, 2005 10:10 pm Post subject: |
|
|
| Code: | /* we exclude shift, GDK_CONTROL_MASK and GDK_MOD1_MASK since we know what
these modifiers mean
these are the mods whose combinations are bound by the keygrabbing code */
#define IGNORED_MODS (0x2000 /*Xkb modifier*/ | GDK_LOCK_MASK | \
GDK_MOD2_MASK | GDK_MOD3_MASK | GDK_MOD4_MASK | GDK_MOD5_MASK)
/* these are the ones we actually use for global keys, we always only check
* for these set */
#define USED_MODS (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK) |
from gnome-settings-keybindings.c...
The IGNORED_MODS is used later to mask out modifiers... Not sure if this is the correct place to try to fix it but I'll see what happens at least.  |
|
| Back to top |
|
 |
rndmtask n00b

Joined: 10 Jan 2004 Posts: 66 Location: Earth
|
Posted: Sat Apr 30, 2005 7:09 am Post subject: |
|
|
Crap, you beat me too it. I was gonna suggest looking there. While getting my sony fn keys working in regards to controlling the brightness I noticed that.
I suggest just moving GDK_MOD4_MASK to the #define USED_MODS line. I'm too tired to try it now but I'll give it a go in the morning if no one else has. |
|
| Back to top |
|
 |
Ryan FB n00b

Joined: 10 Jun 2005 Posts: 1
|
Posted: Fri Jun 10, 2005 1:38 pm Post subject: |
|
|
| rndmtask wrote: | Crap, you beat me too it. I was gonna suggest looking there. While getting my sony fn keys working in regards to controlling the brightness I noticed that.
I suggest just moving GDK_MOD4_MASK to the #define USED_MODS line. I'm too tired to try it now but I'll give it a go in the morning if no one else has. |
This is exactly what my patch on the following GNOME bug does:
Bug 165343: Super (Windows key) isn't recognized as a modifier
I'm using gnome-settings-daemon with this patch applied and it works fine for me (I even have Windows+L bound to lock the screen). |
|
| Back to top |
|
 |
|