I'll look into autokey, but I'm wondering if there's a way to use `keygrabber` to get this done:
http://awesome.naquadah.org/doc/api/modules/keygrabber.html I'm thinking something like:: -- Make Ctrl-t prefix act like modkey awful.key( { "Ctrl" }, "t", function(c) keygrabber.run( function(mod, key, event) if event == "release" then return true end -- TODO What here? return false end) end) I just need to figure out what to put in the "TODO" bit there. Being new to awesome I'm not sure how to do that. Would `key.emit_signal` work? http://awesome.naquadah.org/doc/api/modules/key.html#emit_signal Or maybe I need to look up the binding grabbed key as if it had been modified by `modkey` and call it's handler/callback manually? If so, how? Thanks, Ross On Mon, Oct 1, 2012 at 9:36 AM, Sarang Kulkarni <[email protected]> wrote: > Run > > xmodmap -pm > > to get a list of real keys and their xmodmap aliases. For example, on > my computer, it says that mod1 is the alt key. Then in rc.lua change > the line: > > modkey = mod4 > > modkey = <xmodmap alias of the key you want> > > so to use Alt, for example, make it > > modkey = mod1 > > This allows the use of some other single key as the modkey. If you > want to have a compound modkey, like Ctrl + T, my guess is that one > way to do this would be to use some program like autokey ( > http://code.google.com/p/autokey/ ) which can be configured to > convert a particular key press into something else. It runs as a > daemon in the background and looks for triggers and then executes the > configured actions. You could set the trigger to Ctrl + T and set the > action to mod4 or Super_L, and have awesome consider mod4 to be its > modkey. Then, when you press Ctrl + T, autokey will grab that and send > mod4, which awesome will interpret as its modkey. I am not sure if > this actually works, but it is worth trying. > > Later, please forward / post a summary of the best solution that you > find for this - it could potentially be useful to others as well. > > Sarang > > > On Mon, Oct 1, 2012 at 8:06 PM, Ross Patterson <[email protected]> wrote: >> Switching from StumpWM and ratpoison before that, the thing I really >> miss is the use of a ctrl prefix key binding so I don't have to stretch >> to reach odd keys like mod4. How can I switch mod4 with ctrl-t (or >> anything else)? >> >> Ross >> >> >> -- >> To unsubscribe, send mail to [email protected]. -- To unsubscribe, send mail to [email protected].
