Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] control i3wm sound

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
shogun1234
Posts: 156
Joined: 2006-07-13 08:04
Has thanked: 3 times

[SOLVED] control i3wm sound

#1 Post by shogun1234 »

I started to use i3wm a while ago. Adding the following lines to .config/i3/config file according to http://jackmorrison.me/2014/11/12/from- ... -i3wm.html

Code: Select all

bindsym XF86AudioRaiseVolume exec amixer -q -D set Master 2dB+ unmute
bindsym XF86AudioLowerVolume exec amixer -q -D set Master 2dB- unmute
bindsym XF86AudioMute exec amixer -q -D pulse set Master toggle
But pressing fn + f1 (mute), fn + f2 (lower sound), or fn + f3 (raise sound) doesn't work at all. These function works correctly in gnome environment. What else should I configure or check to get it worked like that in gnome environment?
Last edited by shogun1234 on 2017-03-26 15:03, edited 1 time in total.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: control i3wm sound

#2 Post by debiman »

please find out what codes the desired key use by entering 'xev' in a terminal, then trying out those keys, then edit your config accordingly.

shogun1234
Posts: 156
Joined: 2006-07-13 08:04
Has thanked: 3 times

Re: control i3wm sound

#3 Post by shogun1234 »

1 .Finding the key code
2. paste the related command to .config/i3.conf
3. reload config or logout/ login (I tried both)
4. pressing f1, f2, f3
Unfortunately it still doesn't work. Running command in console (e.g. amixer -q set Master ...) takes effect. But pressing hot key just don't work. Where can I check the problem?

Keycode
F1 keycode

Code: Select all

KeyPress event, serial 32, synthetic NO, window 0x1c00001,
    root 0xb6, subw 0x0, time 11305877, (-258,457), root:(386,477),
    state 0x0, keycode 67 (keysym 0xffbe, F1), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x1c00001,
    root 0xb6, subw 0x0, time 11306021, (-258,457), root:(386,477),
    state 0x0, keycode 67 (keysym 0xffbe, F1), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False


F2 keycode

Code: Select all

KeyPress event, serial 32, synthetic NO, window 0x1c00001,
    root 0xb6, subw 0x0, time 11307081, (-258,457), root:(386,477),
    state 0x0, keycode 68 (keysym 0xffbf, F2), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x1c00001,
    root 0xb6, subw 0x0, time 11307214, (-258,457), root:(386,477),
    state 0x0, keycode 68 (keysym 0xffbf, F2), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
f3 keycode

Code: Select all

KeyPress event, serial 32, synthetic NO, window 0x1c00001,
    root 0xb6, subw 0x0, time 11308294, (-258,457), root:(386,477),
    state 0x0, keycode 69 (keysym 0xffc0, F3), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x1c00001,
    root 0xb6, subw 0x0, time 11308436, (-258,457), root:(386,477),
    state 0x0, keycode 69 (keysym 0xffc0, F3), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
Configuration

Code: Select all

bindsym XF86AudioRaiseVolume exec amixer -q set Master 2dB+ unmute
bindsym XF86AudioLowerVolume exec amixer -q set Master 2dB- unmute
bindsym XF86AudioMute exec amixer -q -D pulse set Master toggle

shogun1234
Posts: 156
Joined: 2006-07-13 08:04
Has thanked: 3 times

Re: control i3wm sound

#4 Post by shogun1234 »

Just find a workaround. Instead of using bindsym, bind code using bindcode. And digit number 67, 68, 69 is the keycode found in 'xev' command.

Code: Select all

bindcode 69 exec amixer -q set Master 2dB+ unmute
bindcode 68 exec amixer -q set Master 2dB- unmute
bindcode 67 exec amixer -q -D pulse set Master toggle

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: [SOLVED] control i3wm sound

#5 Post by debiman »

that is not a workaround, that is a solution!
congratulations.

Post Reply