Announcement

Collapse
No announcement yet.

keyboard shorcut to open context ("right-click") menu: how?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    keyboard shorcut to open context ("right-click") menu: how?

    Can't figure out how to assign a shortcut to pop up the context ("right-click") menus most applications have. Can't find that under Input Actions or Keyboard & Mouse in the System Settings.

    (Follow-up problem: Ideally, I'd like to use the "menu" key (no point letting those Windows keys go unused) but KDE 4 doesn't seem to recognize it (well -- it does, but it calls it <string of "box" characters> and doesn't react to it). I've configured a 105-key PC keyboard in xorg.conf (not that X seems to care anymore) and in the KDE 4 System Settings under Regional & Language (not that I couldn't just leave it unconfigured, since it doesn't make a difference).)

    #2
    Re: keyboard shorcut to open context (&quot;right-click&quot menu: how?

    I added the following line to .kde/Autostart/xinitrc
    Code:
    xmodmap -e 'keycode 151 = Menu'
    This is actually the only entry, so that my entire xinitrc-file looks like this:
    Code:
    #!/bin/sh
    xmodmap -e 'keycode 151 = Menu'
    In case it does not exist... just create a new one (with the contents above) and make it executable with
    Code:
    chmod u+x ~/.kde/Autostart/xinitrc
    The you can use the Win-Menu-Key to make the right-click-menu appear - at least it works for me...

    The only problem I have is, that it does not work after my laptop wakes up from hybernation... I have to restart KDE (or the xserver?)... anyone know how to fix this?

    Comment


      #3
      Re: keyboard shorcut to open context (&quot;right-click&quot menu: how?

      Thanks... but that doesn't seem to work. I don't know where to assign the shortcut for the context menu, and I also can't seem to assign the menu key to (say) the Kickoff menu or the Device Notifier. It still doesn't do anything. (I did restart KDE)

      Comment


        #4
        Re: keyboard shorcut to open context (&quot;right-click&quot menu: how?

        my guess is that the keycode for menu is different on your system...

        you may find this post useful:
        http://kubuntuforums.net/forums/index.php?topic=3093417.0
        it describes how to use 'xev' to find the right keycode.

        As for Kickoff... the shortcut only works when I set is with right-click in the icon, in 'Application Launcher Settings'; when I change the short-cut in 'System Settings' it has no effect...

        Comment


          #5
          Re: keyboard shorcut to open context (&quot;right-click&quot menu: how?

          That's where I changed it, though I can also successfully change it in System Settings (somewhere). As for the shortcut for the context menu, I don't know where to change it or even what the shortcut is now.

          Keycode seems to be 135 here. But when I say xmodmap -e 'keycode 135 = Menu' the key goes completely "silent", no more box characters nor anything else.

          Comment


            #6
            Re: keyboard shorcut to open context (&quot;right-click&quot menu: how?

            hm... maybe there is a conflic with some other key assignment or you try selecting a different keyboard layout (System Settings > Regional & Language), the default layout did some strange things in my case. ... if that does not work I don't know..

            I'm not aware of a keyboard shortcut for the right-click-menu in the system settings... otherwise I would use that of course... it should be there, I totally agree, but I far as I know it is not. Similarly as far as I know you can not change the function of additional mouse buttons in dolphin, which I also consider a major shortcoming...

            Comment


              #7
              Re: keyboard shorcut to open context (&quot;right-click&quot menu: how?

              Or middle/right clicks on the desktop, previously keeping me from needing launcher menus and taskbars...

              I think there *was* context menu shortcut available in some previous but recent release of KDE 4. I'm just not sure it worked; can't remember now.

              Comment


                #8
                Re: keyboard shorcut to open context (&quot;right-click&quot menu: how?

                abalone, did you check whether your menu-key is currently also used for as a Modifier-Key? (i.e. the keys you use for key-combination, e.g. Shift, Ctl, or Alt.) I think in my case Menu way by default a modifier key... but I don't remember what I did to change that.

                Comment


                  #9
                  Re: keyboard shorcut to open context (&quot;right-click&quot menu: how?

                  !!!

                  System Settings -> Regional & Language -> Keyboard Layout -> Advanced -> Alt/Win key behavior -> Add the standard behavior to menu key

                  Apparently, the "standard behavior" was what I was after (setxkbmap -option altwin:menu). Can't use it in shortcuts (somehow it's completely dead there) but it brings up the context menu now, if "Reset old options" is checked also. (Not too clear on that one...)


                  Comment


                    #10
                    Re: keyboard shorcut to open context (&quot;right-click&quot menu: how?

                    abalone, what you describe is exactly what I find in my System Settings, only that it must have been there from the start. (I never changed it in System Settings)

                    The procedure I described above, does not do anything in Jaunty, you are right. (I removed it and it still works...) But I'm sure that's what I had to do in Intrepid, anyway.

                    Presumably they changed the way things work in Jaunty, and the upgrade transferred my xinitrc setting to the system settings?

                    Comment


                      #11
                      Re: keyboard shorcut to open context (&quot;right-click&quot menu: how?

                      Any idea how to assign a combo like Windows + A to a key?

                      My keyboard has all these extra keys, and the one with the quarter note symbol on it could sensibly start Amarok instead of doing nothing. It has keycode 179, but I can't make it a hotkey because "The key you pressed is not supported by Qt." (the other "music keys" are recognized as "Media Next" and such.). So I've used xmodmap to map 179 to Pause and then used Pause to launch Amarok, but for some reason Amarok only starts for the real Pause key (although I used the note key to set up the shortcut). Even if it did work it wouldn't feel quite right to use Pause for this.

                      Then there's a top row of keys that are dead for all I can tell. Is there a way to activate those? My keyboard isn't in the list of keyboard models in the Regional & Language settings. It's a Lenovo "Enhanced Business Keyboard" (USB).

                      Comment

                      Working...
                      X