Re: multimedia keyboard

"Andrey V. Elsukov" <[email protected]>
Newsgroups gmane.comp.window-managers.fluxbox.user
Organization The Kirov RDO
Message-ID <[email protected]>
Jozef Riha wrote:
> into keys config file and press the special key, the root menu pops up
> instantly together with the desired action being performed.

I have make a small patch for RootMenu show at release a WinLogo key.

-- 
WBR, Andrey V. Elsukov
WinLogo-RootMenu.diff (text/plain, 1.1 KB)
--- src/Keys.cc.orig	Sat May  7 02:00:29 2005
+++ src/Keys.cc	Tue May 24 02:48:56 2005
@@ -135,6 +135,12 @@
 
     FbTk::App::instance()->sync(false);
 
+	// keybindigs for RootMenu
+	FbTk::KeyUtil::grabKey(XKeysymToKeycode(
+		FbTk::App::instance()->display(), XK_Super_L), 0);
+	FbTk::KeyUtil::grabKey(XKeysymToKeycode(
+		FbTk::App::instance()->display(), XK_Super_R), 0);
+	
     //open the file
     ifstream infile(filename);
     if (!infile)
--- src/fluxbox.cc.orig	Fri May 13 16:09:17 2005
+++ src/fluxbox.cc	Tue May 24 02:46:33 2005
@@ -1085,8 +1085,16 @@
     if (keyScreen() == 0 || mouseScreen() == 0)
         return;
 
+	static bool needMenu = false;
+	KeySym key = XLookupKeysym(&ke, 0);
+
     switch (ke.type) {
     case KeyPress:
+		
+		if (key == XK_Super_L || key == XK_Super_R)
+			needMenu = true;
+		else needMenu = false;
+
         m_key->doAction(ke);
         break;
     case KeyRelease: {
@@ -1110,6 +1118,11 @@
                 m_watch_keyrelease = 0;
             }
         }
+
+		if (needMenu && (key == XK_Super_L || key == XK_Super_R)) {
+			FbCommands::ShowRootMenuCmd cmd;
+			cmd.execute();	
+		}
 
         break;
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.