Gentoo Forums
Gentoo Forums
Quick Search: in
Binding Window-? to Lock Screen in Gnome (2.8)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
psylence
Tux's lil' helper
Tux's lil' helper


Joined: 08 May 2004
Posts: 113
Location: Midwest, USA

PostPosted: Thu Apr 21, 2005 2:05 am    Post subject: Binding Window-? to Lock Screen in Gnome (2.8) Reply with quote

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
View user's profile Send private message
GaMMa
l33t
l33t


Joined: 23 Aug 2002
Posts: 684
Location: USA

PostPosted: Wed Apr 27, 2005 2:11 am    Post subject: Reply with quote

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
View user's profile Send private message
parsim
Guru
Guru


Joined: 12 Aug 2004
Posts: 347
Location: Melbourne, Australia

PostPosted: Wed Apr 27, 2005 12:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
GaMMa
l33t
l33t


Joined: 23 Aug 2002
Posts: 684
Location: USA

PostPosted: Thu Apr 28, 2005 12:47 am    Post subject: Reply with quote

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
View user's profile Send private message
parsim
Guru
Guru


Joined: 12 Aug 2004
Posts: 347
Location: Melbourne, Australia

PostPosted: Thu Apr 28, 2005 2:16 am    Post subject: Reply with quote

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
View user's profile Send private message
psylence
Tux's lil' helper
Tux's lil' helper


Joined: 08 May 2004
Posts: 113
Location: Midwest, USA

PostPosted: Thu Apr 28, 2005 3:33 am    Post subject: Reply with quote

Found some more information...

There's a RH bug filed for it exactly...
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=139167

And there's a Gnome bug filed that seems like it's related but they aren't seeing the big picture...
http://bugzilla.gnome.org/show_bug.cgi?id=171142

Gnome bug for the problem...
http://bugzilla.gnome.org/show_bug.cgi?id=302245
Back to top
View user's profile Send private message
parsim
Guru
Guru


Joined: 12 Aug 2004
Posts: 347
Location: Melbourne, Australia

PostPosted: Thu Apr 28, 2005 4:05 am    Post subject: Reply with quote

Right you are. I've posted to the Gnome bugzilla.
Back to top
View user's profile Send private message
psylence
Tux's lil' helper
Tux's lil' helper


Joined: 08 May 2004
Posts: 113
Location: Midwest, USA

PostPosted: Thu Apr 28, 2005 10:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
rndmtask
n00b
n00b


Joined: 10 Jan 2004
Posts: 66
Location: Earth

PostPosted: Sat Apr 30, 2005 7:09 am    Post subject: Reply with quote

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
View user's profile Send private message
Ryan FB
n00b
n00b


Joined: 10 Jun 2005
Posts: 1

PostPosted: Fri Jun 10, 2005 1:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum