awesomeWM / awesome

awesome window manager
https://awesomewm.org/
GNU General Public License v2.0
6.37k stars 598 forks source link

Having an odd issue with a specific clientkey, meta+shift+k - not working #3792

Closed ad-on-is closed 1 year ago

ad-on-is commented 1 year ago

I have a strange issue with a specific clientkey that started happening recently. I use meta+shift+(j,i,k,l) to move a client window to a specific screen. This worked fine until now. But all of a sudden meta+shift+k stopped working and doesn't do anything. If I change the key to something else, like "h" then it works. But I need it to be on "k".

Here's my current config.


local modkey = "Mod4"
local altkey = "Mod1"

awful.util.clientkeys = awful.util.table.join(
    awful.key(
        { altkey, "Shift" }, "m", lain.util.magnify_client
     ), awful.key(
        { modkey }, "f", function( c )

            c.maximized = not c.maximized
            c:raise()
        end
     ), awful.key(
        { modkey, "Shift" }, "f", function( c )

            c.fullscreen = not c.fullscreen
            c:raise()
        end
     ), awful.key( { modkey }, "q", function( c ) c:kill() end ), awful.key(
        { modkey }, "d", function( c )
            awful.client.floating.toggle()
            awful.placement.centered( c )
        end
     ), awful.key( { "Control" }, "Return", function( c ) c:swap( awful.client.getmaster() ) end ),
        awful.key( { modkey }, "o", function() focus_client( 1 ) end ),
        awful.key( { modkey, altkey }, "o", function() awful.client.swap.byidx( 1 ) end ),
        awful.key( { modkey, "Shift" }, "o", function( c ) awful.client.swap.byidx( 1 ) end ), awful.key(
            { modkey, "Shift" }, "i", function( c )
                for s in screen do if s.outputs["DisplayPort-1"] ~= nil then c:move_to_screen( s ) end end
            end
         ), awful.key(
            { modkey, "Shift" }, "k", function( c )
                for s in screen do if s.outputs["DisplayPort-0"] ~= nil then c:move_to_screen( s ) end end
            end
         ), awful.key(
            { modkey, "Shift" }, "l", function( c )
                for s in screen do if s.outputs["HDMI-A-0"] ~= nil then c:move_to_screen( s ) end end
            end
         ), awful.key(
            { modkey, "Shift" }, "j", function( c )
                for s in screen do if s.outputs["DisplayPort-2"] ~= nil then c:move_to_screen( s ) end end
            end
         ), awful.key( { modkey }, "m", function( c ) c.minimized = true end )
 )

expected behaviour

actual behaviour

What's strange is, if I invoke the key-combo with xdotool it works.

KEY=Super+Shift+k
xdotool keydown ${KEY}; xdotool key XF86LogGrabInfo; xdotool keyup ${KEY}

What am I missing here?

unai-ndz commented 1 year ago

Do you have another software that could have that hotkey assigned? Recently one of mine stopped working because xfce assigned that to something and was eating the input.

ad-on-is commented 1 year ago

@unai-ndz That what I was trying to find out with XF86LogGrabInfo and inspecting the logs (journalctl and /var/log/Xorg.0.log), but there doesn't seem anything else grabbing the input. Is there anything else I can do to inspect what's eating the input?

I'm also not running awesome through xfce or anything else.

unai-ndz commented 1 year ago

Can't think of anything else tbh.

ad-on-is commented 1 year ago

Solved!

The issue was a combination of xmodmap, globalkeys and clientkeys.

I disabled all global keys, except for the awesome.restart key, and everything worked as expected. I pinpointed it down to a global key modkey+shift+5. Interestingly, on my custom keyboard, I've mapped "5" to "k", but on a separate layer. However, this did not explain the fact, that the key still didn't work on my regular keyboard.

Then I remembered, in xmodmap I've overwritten the key "k" to be also "5" when hitting the right_meta key. Therefore the global shortcut meta+shift+5 AND the client shortcut meta+shift+k didn't work at all.