Announcement

Collapse
No announcement yet.

Is it possible to 'trigger action by keyboard&mouse combination' in kwin like compiz?

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

    Is it possible to 'trigger action by keyboard&mouse combination' in kwin like compiz?

    [EDIT]
    TLDR I wanted to enter desktop cube with CTRL+ALT+Left mouse click, just like how it was possible in compiz.
    figured out how to achieve this in kwin, this is how its done:
    # sudo apt-get install xbindkeys
    # echo -e '#EnterDesktopCube\n"qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut Cube"\n control+Alt + Alt_L + b:1' > ~/.xbindkeysrc
    but apparently there is a bug in kde as the cube goes randomly wild and spins radically before it stops and focus on a random (X,Y) on the current desktop.

    Also I have yet to figure out how to achieve `leaving of desktop cube on LeftMouseClickUp` as I enter with LeftMouseClickDown
    at least I wish it would be like that, because I actually enter with LeftMouseClickDownUp or simply LeftMouseClick event.

    anyways the compiz way of doing it still wins, but in their current versions (unlike in the far far past) using compiz with kde works terribly.

    now thinking about it, what I really want is to enter the cube with CTRL+ALT+MOUSE_CLICK, and leave it only in CLTR_UP or ALT_UP or CTRL_UP+ALT_UP
    haven't achieved that yet
    [/EDIT]

    I remember that in compiz it used to be possible to trigger actions by dragging to desktop edges, clicking on mouse buttons, clicking on keyboard buttons
    and a combination of the last two as well.

    I used to love in compiz entering cube view by clicking CTRL+ALT+LEFT MOUSE CLICK
    I really hate it how it is only possible to do so in kwin by CTRL+F11 (or any other keyboard buttons setting that I set up via 'Desktop Effects')

    I really don't like it, so I tried running compiz under KDE.
    some of the compiz stuff worked but the overall experience was mostly horrible.


    that is the only reason I tried to move to compiz instead of kwin.

    is it possible to trigger actions in kwin same as it is possible in compiz by mouse clicks combinations with keyboard clicks?
    Last edited by Miki800; Jul 10, 2013, 09:18 AM. Reason: solved

    #2
    Welcome to Kubuntu Forums . Net

    Not that I am aware of. For sure, not from the GUI shortcut configurations; I just tried.

    Kwin is quite robust in it's own right, but it isn't Compiz. As you've already discovered, installing/running Compiz with Kwin has undesired consequences.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      undesired to say the least..
      meh

      Comment


        #4
        I have a college instructor who says, everything is possible, you just have to apply yourself. I guess this is why I still don't have x-ray vision or leap tall buildings... I am a slacker.

        It seems that if you don't mind running a script in the background you could use xdotool eh?

        ===some time later===
        oops! I mean Xbindkeys... ---> http://www.nongnu.org/xbindkeys/xbindkeys.html

        It links commands to keys or mouse buttons, using a configuration file. You can install with;
        sudo apt-get install xbindkeys

        Optional you can add the gui but the gui is not really that good better to config using the file.
        sudo apt-get install xbindkeys-config
        Last edited by Simon; Jul 08, 2013, 10:13 PM. Reason: correction

        Comment


          #5
          A few howtos for xbindkeys (you can set a modifier-key + mouse button [ctrl+alt+LMB] to run commands [like dbus calls] or emulate keypresses [like ctrl+F11]):
          http://blog.hanschen.org/2009/10/13/...ith-xbindkeys/
          http://marian.schedenig.name/2012/06...mouse-buttons/

          Comment


            #6
            OHHHH xbindkeys!!! I remember using it years ago in my last linux and also continuously in my previous workplace linux !!! ohh that thing was so useful! how I missed it ^_^

            I will post my results after I have time to attempt using xbindkeys for my specific purpose.

            edit:
            xbindkeys is amazingly perfect for solving all sorts of kde's misreachings or bugs, for example
            I have Microsoft Ergonomic natural keyboard 4000 and I have a Calculator button that is seemingly recognized by kde's key-to-command default binding interface
            but when I click it nothing happens. when I bind it with xbindkeys it works perfectly!
            Last edited by Miki800; Jul 10, 2013, 09:28 AM.

            Comment


              #7
              is there a textual repository easily available for popular dbus calls that I can look at to find out which one does the same thing done by clicking on CTRL+F11 to enter the Desktop Cube?
              or must I install qt4-dev-tools to use dbusviewer to figure this out on my own?

              EDIT:
              Is there maybe a file under /var/log that holds the recent dbus calls that I can look at, run my dbus call by keyboard click, look at that file again
              extract the difference and parse from it my dbus call line that I need for xbindkeys?
              EDIT2:
              I think I have just answered myself, tried triggering Desktop Cube and I saw that no file gets updated in /var/log..
              unless.. unless the logs are buffered and updated only once a certain buffer size gets filled? meh....

              EDIT3:
              OK, I figured out that the command I want would probably look like this:
              qdbus org.kde.kwin /KWin <ENTER_DESKTOP_CUBE_QDBUSKWIN_KEYWORD_NAME>
              and I just need to figure out the last parameter's actual value. I need to find documentation for this... google it is..

              EDIT4:
              FOUND IT! here:
              http://blog.hanschen.org/2009/10/13/.../#comment-2121
              its:
              Originally posted by Zoffix Znet
              qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut Cube
              !!!
              Now going to try and bind it to a mouse key!
              Result: Doesn't work when binding it to a mouse key, works on command line and when I click with xbindkeys-config's gui "Run Action" too.

              Testing to see if the problem is with running qdbus commands with xbindkeys using mouse clicks, or the problem is with running ANYTHING using xbindkeys using mouse clicks by changing the command to xterm instead of qdbus

              Result - never mind, the whole problem was with 'Get Key' it got the wrong input, I manually fixed it to
              control+Alt + Alt_L + b:1
              when it wrongly was auto-assigned to
              Control+Alt + Alt_L | m:0xc + c:64

              now it works


              the only problem is that when I trigger the command, when the `entering desktop cube` effect is beginning
              there is a very very wild spin of the cube right when it starts, then it focuses on some random location pointing to my current desktop
              ignoring completely the position of the mouse cursor relatively to the desktop's (X,Y)

              I think this is a bug.
              should I file a bug report?

              (last edit -
              now thinking about it, what I really want is to enter the cube with CTRL+ALT+MOUSE_CLICK, and leave it only in CLTR_UP or ALT_UP or CTRL_UP+ALT_UP,
              or more like enter with *** as above *** and stay as long as ALT_DOWN+CTRL_DOWN or MOUSE_DOWN, if one of them is UP then leave at current desktop!
              this is how it worked on compiz and I was very pleased with that result, I guess currently it can't be done in kwin.

              haven't achieved that yet. but I have less motivation to continue this research so for now I'm giving up pursuing this any further.)
              Last edited by Miki800; Jul 10, 2013, 09:21 AM.

              Comment


                #8
                My favourite compiz keyboard+mouse combo to zoom the desktop in and out (Meta+mouse scroll wheel) is sorely lacking in KDE. It's something I've lamented many times, it's just SO intuitive! It's just not the same to use Meta+= or Meta+- to do the same thing, especially as once it's activated you use the mouse to move around anyway.

                I have designated moving the mouse to the top right corner to activate the desktop cube and this achieves somewhat the ease I need. I shun complex keyboard combos because I can never remember which one it is I want and end up getting frustrated with them.
                Last edited by Rod J; Jul 12, 2013, 06:03 AM. Reason: Expanding
                Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
                Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

                Comment


                  #9
                  Originally posted by Rod J View Post
                  My favourite compiz keyboard+mouse combo to zoom the desktop in and out (Meta+mouse scroll wheel) is sorely lacking in KDE. It's something I've lamented many times, it's just SO intuitive! It's just not the same to use Meta+= or Meta+- to do the same thing, especially as once it's activated you use the mouse to move around anyway.

                  I have designated moving the mouse to the top right corner to activate the desktop cube and this achieves somewhat the ease I need. I shun complex keyboard combos because I can never remember which one it is I want and end up getting frustrated with them.
                  Its not much of the remembering I have trouble with, its just with the fact that I am limited to operations which are not the fastest way possible,
                  for example if one hand is on the keyboard and the other is on the mouse
                  the most efficient way to command an action would be a combination of the two
                  compared to the slower counterpart of moving the mouse hand back to the keyboard to perform these operations.

                  of course in mouse-less-encouraged environments [that are more popular in *nix then elsewhere imo] this would not be an issue,
                  but since this is a desktop environment we are talking about, in which using the mouse is a core part of the interface usage,
                  it would be best to implement and allow mouse and keyboard combinations.

                  I talked about compiz in one of the other threads (or this one maybe) that I opened,
                  someone compared gnome to kde saying that gnome hides configurations but -even though heavily buried sometimes- kde does not.

                  well then - here this is not the case as in gnompiz I could do this easily and in kdewin I cannot.


                  at least today I learned a lot about the existence of qdbus and its infinite possibilities
                  Last edited by Miki800; Jul 12, 2013, 02:43 PM.

                  Comment


                    #10
                    Originally posted by Miki800 View Post
                    I talked about compiz in one of the other threads (or this one maybe) that I opened,
                    someone compared gnome to kde saying that gnome hides configurations but -even though heavily buried sometimes- kde does not.
                    well then - here this is not the care as in gnompiz I could do this easily and in kdewin I cannot.
                    That isn't a great analogy, as compiz isn't gnome software. One could say gnome "removed" these as gnome-shell and compiz are incompatible, AFAIK.

                    And KDE isn't really hiding the setting...hiding means that there is a setting that can be set, but not from GUI. There are hidden settings in KDE as well, but as a general rule much less than in gnome (OTOH Gnome has recently been removing settings rather than hiding them).

                    Comment

                    Working...
                    X