我如何在Awesome WM编码一个键绑定序列?



我的问题是,在Awesome WM(窗口管理器)中进行键绑定的基本选项,awful.key(),不适用于[super+d, e]或[super+d, super+r]等键绑定。

我找到了一个做这件事的方法,但是不现实。也许是' terrible。keygrabber '的参数可以,但是我找不到很多关于它行为的信息。

是这样的:

awful.keygrabber {
start_callback = function() --[[do something]]  end,
stop_callback  = function() --[[do something]] end,
-- You might want to avoid `export_keybindings` if you want
-- a single point of entry. If so, they use a normal `awful.key`
-- to start the keygrabber.
export_keybindings = true,
-- This is the important part, it releases the keygrabber
-- when `Super` is released. If you don't want this and
-- release when an unrelated key  is pressed, do it 
-- with `keypressed_callback` instead.
stop_event = "release",
stop_key = {"Escape", "Super_L", "Super_R"},
keybindings = {
{{ modkey } , "d" , function()
--[[do something]]
end},
{{ modkey } , "e" , function()
--[[do something]]
end},
}
}

最新更新