Arch Teapot Notes 12-02-18: Difference between revisions

From Chaosdorf Wiki
m (added category)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Multimedia Keys ==
== Multimedia Keys ==


We learned that multimedia keys are available by using ''showkey''. To use it, one has to go to a text terminal, start ''showkey'' and press the buttons in question.
We learned that multimedia keys are available by using <tt>xev</tt>. To use it, start <tt>xev | grep keycode</tt> and press the buttons in question.


The shown keycodes (example X201) should be placed in <tt>~/.Xmodmap</tt>
Notice: ''if your window manager evaluates the pressed keycodes, nothing will show up.''
<source lang="xorg_conf">
 
keycode 234 = XF86Back
The shown keycodes should be placed in <tt>~/.Xmodmap</tt> and loaded on X startup by <tt>xmodmap ~/.Xmodmap</tt>.
keycode 233 = XF86Forwardpre
 
keycode 144 = XF86AudioPrev
Example (ThinkPad X61):
keycode 164 = XF86AudioStop
<source lang="lua">
keycode 162 = XF86AudioPlay
keycode 113 = XF86AudioMute
keycode 153 = XF86AudioNext
keycode 114 = XF86AudioLowerVolume
keycode 160 = XF86AudioMute
keycode 115 = XF86AudioRaiseVolume
keycode 174 = XF86AudioLowerVolume
keycode 148 = XF86Launch1 # ThinkVantage Button
keycode 176 = XF86AudioRaiseVolume
keycode 163 = XF86AudioNext
keycode 164 = XF86AudioPlay
keycode 165 = XF86AudioPrev
keycode 166 = XF86AudioStop
</source>
</source>


== Multimedia Keys for X61s ==
The terminal based program ''showkeys'' won’t work, since kernel keycodes differ from X11.
 
ArchWiki [https://wiki.archlinux.org/index.php/Xmodmap Xmodmap]
 
These keysyms can be used for your favorite window manager‘s configuration.
 
Example (awesome):
<source lang="lua">
<source lang="lua">
113  Volume Mute
  -- Multimedia Keys
114  Volume Down
    awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn('mpc -h localhost volume +1') end),
115  Volume Up
    awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn('mpc -h localhost volume -1') end),
143  FnKey itsel
    awful.key({ }, "XF86AudioMute", function () awful.util.spawn('mpc -h localhost volume 0') end),
148  ThinkVantage Button
    awful.key({ }, "XF86AudioNext", function () awful.util.spawn('mpc -h localhost next') end),
152  ScreenLock (Fn+F2)
    awful.key({ }, "XF86AudioPrev", function () awful.util.spawn('mpc -h localhost prev') end),
163  Media Next
    awful.key({ }, "XF86AudioPlay", function () awful.util.spawn('mpc -h localhost toggle') end)
164  Media Play/Pause
165  Media Previous
166  Media Stop
191  Trackpoint/Touchpad Switch (Fn+F8)
194  Dock Eject (Fn+F9)
224  Brightness Down
225  Brightness Up
227  Monitor (Fn+F7)
236  Battery (Fn+F3)
238  WLAN (Fn+F5)
372  Fn+Space
</source>
</source>


Line 46: Line 44:
* pavucontrol (GTK based mixer application)
* pavucontrol (GTK based mixer application)
* paprefs (GTK based configuration tool)
* paprefs (GTK based configuration tool)
* pulseaudio-alsa
With ''pulseaudio-alsa'', applications may use a virtual ALSA device for output. They show up as regular PulseAudio clients and there is an ALSA mixer channel to control the volume.


Note: in order to discover remote soundcards, one has to start ''avahi-daemon''!
Note: in order to discover remote soundcards, one has to start ''avahi-daemon''!
[[Category:Arch Teapot]]

Latest revision as of 12:33, 20 February 2012

Multimedia Keys[edit | edit source]

We learned that multimedia keys are available by using xev. To use it, start xev | grep keycode and press the buttons in question.

Notice: if your window manager evaluates the pressed keycodes, nothing will show up.

The shown keycodes should be placed in ~/.Xmodmap and loaded on X startup by xmodmap ~/.Xmodmap.

Example (ThinkPad X61):

keycode 113 = XF86AudioMute
keycode 114 = XF86AudioLowerVolume
keycode 115 = XF86AudioRaiseVolume
keycode 148 = XF86Launch1 # ThinkVantage Button
keycode 163 = XF86AudioNext
keycode 164 = XF86AudioPlay
keycode 165 = XF86AudioPrev
keycode 166 = XF86AudioStop

The terminal based program showkeys won’t work, since kernel keycodes differ from X11.

ArchWiki Xmodmap

These keysyms can be used for your favorite window manager‘s configuration.

Example (awesome):

  -- Multimedia Keys
    awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn('mpc -h localhost volume +1') end),
    awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn('mpc -h localhost volume -1') end),
    awful.key({ }, "XF86AudioMute", function () awful.util.spawn('mpc -h localhost volume 0') end),
    awful.key({ }, "XF86AudioNext", function () awful.util.spawn('mpc -h localhost next') end),
    awful.key({ }, "XF86AudioPrev", function () awful.util.spawn('mpc -h localhost prev') end),
    awful.key({ }, "XF86AudioPlay", function () awful.util.spawn('mpc -h localhost toggle') end)

PulseAudio[edit | edit source]

PulseAudio is a sound system enabling us to control application volumes individually and use other computers soundcards over the network.

Recommended packages:

  • pulseaudio (the daemon, required)
  • pavucontrol (GTK based mixer application)
  • paprefs (GTK based configuration tool)
  • pulseaudio-alsa

With pulseaudio-alsa, applications may use a virtual ALSA device for output. They show up as regular PulseAudio clients and there is an ALSA mixer channel to control the volume.

Note: in order to discover remote soundcards, one has to start avahi-daemon!