LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 02-16-2012, 07:29 PM   #1
NEQTAN
Member
 
Registered: Jan 2012
Location: ND USA
Distribution: Linux Mint 12
Posts: 52

Rep: Reputation: 1
Linux Mint 12: Need Help: mapping super key to MGSE bottom panel menu


System:

Linux Mint 12
Gnome3
Kernel 3.0.0-12
Fully updated -mate

I would like to map (keybind) the windows key (super key / meta key) to the bottom panel MGSE menu. Rather than the menu you can access from the infinity icon at the top left "GNOME 3 Activities".

I have been trying vigorously on my own to figure out how to make this work. To me it seems Mint Gnome Shell Extension adds a complication to the old method.
  • There is no right-click on menu as in previous versions
  • There is no mint-menu
  • Even the version 11 method of altering the keyboard shortcut is no longer existant
  • I have installed gconf-editor, but I can not find the correct instance in the configuration editor menu tree to bind a key to
  • I have been milling around in the bottom panel files hoping to find something to mod.

If there is something I missed or anyone has a suggestion, post freely.

Neq
 
Old 02-19-2012, 01:08 PM   #2
NEQTAN
Member
 
Registered: Jan 2012
Location: ND USA
Distribution: Linux Mint 12
Posts: 52

Original Poster
Rep: Reputation: 1
Update: Need to mod: _onSourceKeyPress: function

Making progress:

I found the file that needs attention:

/usr/share/gnome-shell/extensions/menu[@]linuxmint[.]com/extension.js

Remove brackets from around @ and .

This is the link to the file for review:

https://github.com/linuxmint/MGSE/bl...m/extension.js

There is two parts of interest:

Part1

Code:
MintButton.prototype = {
    __proto__: PanelMenu.ButtonBox.prototype,

    _init: function(menuAlignment) {
        PanelMenu.ButtonBox.prototype._init.call(this, { reactive: true,
                                               can_focus: true,
                                               track_hover: true });

        this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress));
        this.actor.connect('key-press-event', Lang.bind(this, this._onSourceKeyPress));
Part2

Code:
_onSourceKeyPress: function(actor, event) {
        let symbol = event.get_key_symbol();
        if (symbol == Clutter.KEY_space || symbol == Clutter.KEY_Return) {
            this.menu.toggle();
            return true;
        } else if (symbol == Clutter.KEY_Escape && this.menu.isOpen) {
            this.menu.close();
            return true;
        } else if (symbol == Clutter.KEY_Down) {
            if (!this.menu.isOpen)
                this.menu.toggle();
            this.menu.actor.navigate_focus(this.actor, Gtk.DirectionType.DOWN, false);
            return true;
        } else
            return false;
    },
Part two is the real focus. To alter this to allow Super_L as the symbol / key that toggles the menu. Still working out this part.

I have already used gconf-editor and configured the keys that were binded to the Super_L key to eliminate error messages and conflicts.

"main_menu_key" is= <Alt>F1
"panel_main_menu" is= <Alt>F1
"overlay_key" now= <Alt>F1 from= Super_L
"show_desktop" now= <Alt>F3 from= <Super>d

The main_menu_key, panel_main_menu, and overlay_key all open Activities Overview. As well does clicking on the "Infinity" button with the mouse cursor.

So before the changes there was three ways to toggle the Activities Overview. But only one way to toggle the "mintmenu"/"panelmenu", clicking on it with the mouse cursor.

Im trying to refrain from altering any Clutter files. Some of these js files are touchy as it is.

If anyone has any ideas. Please let me know.

Neq

Last edited by NEQTAN; 02-19-2012 at 01:47 PM.
 
Old 03-19-2012, 04:19 PM   #3
ukhellfire
LQ Newbie
 
Registered: Mar 2012
Posts: 1

Rep: Reputation: Disabled
hello there...


im looking to do the exact same thing as you. i have completely diabled the keybinding for the overlay, and thus wish to us the Super_L key (left windows key) to open the mint menu on the bottom left...
I have looked in the same places as you, and come to the same conclusion that it needs to be something within /usr/share/gnome-shell/extensions/extension.js

although will binding the keys only work within the mint menu? and not globally? u need to be able to launch the mintmenu from within the shell-extension if i understand this correctly... alas, i am not a JS wizz unfortunately, or i may hhave done this already...


ANY help on this would be appreciated!
 
Old 03-23-2012, 09:24 AM   #4
NEQTAN
Member
 
Registered: Jan 2012
Location: ND USA
Distribution: Linux Mint 12
Posts: 52

Original Poster
Rep: Reputation: 1
Yes we need to alter the mint menu extension or create a new extension that will create a function for us to open menu with super l. I have found altering the mint menu extension often ends with the mint menu button disappearing. I still have not figured out the correct code for this either. I have come to the conclusion that clutter already has been programmed to use super l to open the activities button. So getting clutter to react to the same input with a new output will require learning how to delete the original command and program a new call back
 
Old 03-23-2012, 09:31 AM   #5
NEQTAN
Member
 
Registered: Jan 2012
Location: ND USA
Distribution: Linux Mint 12
Posts: 52

Original Poster
Rep: Reputation: 1
In short i have not figured this out yet. I think clutter needs to be configured to allow menu instead of activities to open via super l.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux Mint 12 Will Come With Gnome 3 And MGSE LXer Syndicated Linux News 0 11-05-2011 02:00 PM
mapping the windows key to the KDE start menu Cultist Linux - General 1 11-25-2010 05:03 AM
[SOLVED] Xubuntu - top panel & bottom panel disappeared alanp Linux - Newbie 2 08-25-2010 12:14 PM
slack 13 menu panel on bottom of the screen disappeared svar Slackware 11 05-19-2010 02:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 06:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration