On Fri, Dec 12, 2014 at 11:10:17AM +0100, Fabien Meghazi wrote:
> Hi all,
> 
> I'd like to map Win+C to X86Copy and map Win+V to X86Paste, ... but it
> seems I can only map program execution to key shortcut (not sure if
> I'm correct about this)
> 
> Can someone tell me how could I achieve this with qtile ?

I'm not sure you can alias keys right now, although it shouldn't be
too hard to add (untested):

commit a863863ca841463abcbcf871fc52b20e6e11e05f
Author: Tycho Andersen <[email protected]>
Date:   Fri Dec 12 07:53:37 2014 -0600

    add lazy.fake_keypress('r')

diff --git a/libqtile/manager.py b/libqtile/manager.py
index a1c17e8..a6c55a2 100644
--- a/libqtile/manager.py
+++ b/libqtile/manager.py
@@ -1613,3 +1613,10 @@ class Qtile(command.CommandObject):
                 self.log.warning("Not found bar for hide/show.")
         else:
             self.log.error("Invalid position value:%s" % position)
+
+    def cmd_fake_keypress(self, key):
+        d = object()
+        keysym = xcbq.keysyms[key]
+        d.detail = self.keysym_to_keycode(keysym)
+        d.state = 0
+        self.handle_KeyPress(d)

..and then do something like:

Key([mod], "c", lazy.fake_keypress("X86Copy")),
Key([mod], "v", lazy.fake_keypress("X86Paste")),

Tycho

> Thanks.
> 
> -- 
> Fabien Meghazi
> http://www.amigrave.com
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "qtile-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to