The officially official Devuan Forum!

You are not logged in.

#1 2020-02-15 18:13:10

stecco
Member
Registered: 2020-01-24
Posts: 14  

i3 window manager: mod4 (win key) doesn't work

mod1 (alt) instead works perfectly.

I tried to

xev

then I pressed the win key and this is the result:

KeyPress event, serial 37, synthetic NO, window 0x2e00001,
    root 0xeb, subw 0x0, time 4162734, (-817,-155), root:(694,703),
    state 0x0, keycode 133 (keysym 0xff20, Multi_key), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: True

KeyRelease event, serial 37, synthetic NO, window 0x2e00001,
    root 0xeb, subw 0x0, time 4162817, (-817,-155), root:(694,703),
    state 0x0, keycode 133 (keysym 0xff20, Multi_key), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

then I did

~$ xmodmap -e "clear mod4"
~$ xmodmap -e "add Mod4 = Multi_key"

also, if I

~$ xmodmap -pm|grep mod4
mod4        Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)

However, mod4 still doesn't work. Any suggest?

Offline

#2 2020-02-15 21:56:13

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: i3 window manager: mod4 (win key) doesn't work

Try

i3-config-wizard

^ That should ask which modifier key to use as the default.

Remove your extant configuration file beforehand though to prevent conflicts. You can re-apply your options to ~/.config/i3/config afterwards.


Brianna Ghey — Rest In Power

Offline

#3 2020-02-16 12:20:11

stecco
Member
Registered: 2020-01-24
Posts: 14  

Re: i3 window manager: mod4 (win key) doesn't work

Thank you Head_on_Stick for your help.

~$ rm .config/i3/config
~$ i3-config-wizard 
[libi3] ../../i3-wm-4.13/libi3/font.c Using Pango font monospace, size 8
[libi3] ../../i3-wm-4.13/libi3/font.c X11 root window dictates 96.050420 DPI
[libi3] ../../i3-wm-4.13/libi3/font.c Using Pango font monospace, size 8
Keypress 36, state raw = 0
 (65293)
Modifier keycode for Mod1: 0x40
Modifier keycode for Mod1: 0xcd
Modifier keycode for Mod4: 0x86
Modifier keycode for Mod4: 0xce
Modifier keycode for Mod4: 0xcf
Keypress 36, state raw = 0
 (65293)
creating "/home/stecco/.config/i3/config"...

But the win key is still not working.

Offline

#4 2020-02-16 15:12:23

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: i3 window manager: mod4 (win key) doesn't work

Did the wizard ask you which modifier to use? I just tried it myself and it asked me.

The relevant section in ~/.config/i3/config seems to be

set $mod Mod4

Do you have that?


Brianna Ghey — Rest In Power

Offline

#5 2020-02-16 15:54:34

stecco
Member
Registered: 2020-01-24
Posts: 14  

Re: i3 window manager: mod4 (win key) doesn't work

Head_on_a_Stick wrote:

Did the wizard ask you which modifier to use? I just tried it myself and it asked me.

Yes it did

Head_on_a_Stick wrote:

The relevant section in ~/.config/i3/config seems to be

set $mod Mod4

Do you have that?

Yes I do.

Offline

#6 2020-02-17 13:51:45

stecco
Member
Registered: 2020-01-24
Posts: 14  

Re: i3 window manager: mod4 (win key) doesn't work

I am now in the xfce session and I'm trying to set keyboard shortcuts for applications:

Screenshot-2020-02-17-14-39-23.png

When I try to set xfce4-appfinder from alt+F3 to Super+F3 and I press the win key, xfce doesn't allow me to create a combination with the window key but I can create a shortcut just with the win key. Seems that the problem is that for some reason I can't create combinations with the "Multi key" (aka win key) key

Offline

#7 2020-02-17 14:19:41

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: i3 window manager: mod4 (win key) doesn't work

Perhaps the key is sticking. Can you test with a different keyboard? Or perhaps try a live session to eliminate mis-configuration.


Brianna Ghey — Rest In Power

Offline

#8 2020-02-17 14:52:27

HevyDevy
Member
Registered: 2019-09-06
Posts: 358  

Re: i3 window manager: mod4 (win key) doesn't work

Offline

#9 2020-02-17 17:20:34

stecco
Member
Registered: 2020-01-24
Posts: 14  

Re: i3 window manager: mod4 (win key) doesn't work

Head_on_a_Stick wrote:

Perhaps the key is sticking. Can you test with a different keyboard? Or perhaps try a live session to eliminate mis-configuration.

I tried to xev on a devuan live  session from the iso, this is the output:

KeyPress event, serial 37, synthetic NO, window 0x2c00001,
    root 0xeb, subw 0x0, time 46783, (144,366), root:(1655,1178),
    state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x2c00001,
    root 0xeb, subw 0x0, time 46852, (144,366), root:(1655,1178),
    state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

the win key here is  Super_L not Multi_key

I also tried a Manjaro i3 live session and the keybindings with the win key worked perfectly. Command xev didn't worked, the package wasn't installed.

@HevyDevy I read the manpage, could be this the section that i have to look?

Many applications support the notion of Meta keys (similar to Control keys except that Meta is held down instead of Control). However, some servers do not have a Meta keysym in the default keymap table, so one needs to be added by hand. The following command will attach Meta to the Multi-language key (sometimes labeled Compose Character). It also takes advantage of the fact that applications that need a Meta key simply need to get the keycode and don't require the keysym to be in the first column of the keymap table. This means that applications that are looking for a Multi_key (including the default modifier map) won't notice any change.

%  xmodmap -e "keysym Multi_key = Multi_key Meta_L"

Have I to remap my win key something like this?

%  xmodmap -e "keysym Multi_key = Super_L"

Forgive me if I made some sintax errors

Offline

#10 2020-02-18 09:27:10

HevyDevy
Member
Registered: 2019-09-06
Posts: 358  

Re: i3 window manager: mod4 (win key) doesn't work

sorry i should have read your opening post better, looks like you have looked into xmodmap. I think i meant to say setxkbmap

what does doing this command give you?

setxkbmap -option altwin:swap_alt_win

if this works for you, put it in your autostart file.

to restore the default behaviour do...

setxkbmap -option

Offline

#11 2020-02-18 15:14:48

stecco
Member
Registered: 2020-01-24
Posts: 14  

Re: i3 window manager: mod4 (win key) doesn't work

~$ setxkbmap -option altwin:swap_alt_win

give me no output, xev give me the same output when I press the win key and mod+keybind in i3 doesn't work

but...

Screenshot-2020-02-18-16-00-39.png

In xfce now i can set the shortcuts super+anyletter as I wish.

I also gave

~$ setxkbmap -option

and the win key still work with combos

EDIT

Seems that

~$ setxkbmap -option altwin:swap_alt_win

works only if also give after

~$ setxkbmap -option

If I logout the xfce session and I log in after, I have to give again both commands to make the combos with the win key working. I will try later with i3 but I have to find a way to run the terminal in a session with Mod4 binding key with Mod4 not working!

Last edited by stecco (2020-02-18 15:46:26)

Offline

#12 2020-02-19 08:02:11

HevyDevy
Member
Registered: 2019-09-06
Posts: 358  

Re: i3 window manager: mod4 (win key) doesn't work

I dont know much about i3 but below command should swap your meta key from left Alt to left Super or Win key. If you want this behaviour and it works you need to put it in your autostart file so it saves the configuration over reboots and logouts etc.

setxkbmap -option altwin:swap_alt_win

The below command will unset above command and set your keybinds back to what they were originally.

setxkbmap -option

If you are using xfce4 and the i3 window manager together and not using xfwm then you need to figure out why i3wm is not taking the settings.

what are your configurations,

1. xfce4 - i3wm session
2. xfce4 - xfwm session
3.standalone i3 session no desktop

Offline

Board footer