You are not logged in.

#1 2009-08-11 18:48:28

SpeedVin
Member
From: Poland
Registered: 2009-04-29
Posts: 955

[Solved] DWM and extra key's.

Hello.
I'm using DWM and now I have new keyboard with extra kyes Audio Mute, Raise or Lower volume you know wink
I tried:

showkey

And I have my key in .Xmodmap , I typed:

/path/to/.Xmodmap

and all was ok wink
And typed xmodmap and my keys was in mod4 section , this is the output of xmodmap:

xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x6d)
mod1        Alt_L (0x40),  Meta_L (0x9c)
mod2        Num_Lock (0x4d)
mod3      
mod4        XF86AudioRaiseVolume (0x73),  XF86AudioRaiseVolume (0x74),  Super_L (0x7f),  Hyper_L (0x80)
mod5        Mode_switch (0x5d),  ISO_Level3_Shift (0x71),  ISO_Level3_Shift (0x7c)

Now I care to play with config.h of my DWM.
Here is part of it:

{ MODKEY,                       XF86AudioRaiseVolume,  spawn,     SHCMD("exec mpc volume -5")}

And when I tried to compile it with that config I got following errors:

In file included from dwm.c:271:
config.h:41: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Key'
config.h:65: warning: ISO C does not allow extra ';' outside of a function
config.h:69: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Button'
config.h:80: warning: ISO C does not allow extra ';' outside of a function
dwm.c: In function 'buttonpress':
dwm.c:440: error: 'buttons' undeclared (first use in this function)
dwm.c:440: error: (Each undeclared identifier is reported only once
dwm.c:440: error: for each function it appears in.)
dwm.c: In function 'grabbuttons':
dwm.c:929: error: 'buttons' undeclared (first use in this function)
dwm.c: In function 'grabkeys':
dwm.c:952: error: 'keys' undeclared (first use in this function)
dwm.c: In function 'keypress':
dwm.c:1020: error: 'keys' undeclared (first use in this function)
make: *** [dwm.o] Errpr 1
And building stop's :(
Is someone use extra keys with DWM.

Thanks for any help wink

Last edited by SpeedVin (2009-08-12 18:33:25)


Shell Scripter | C/C++/Python/Java Coder | ZSH

Offline

#2 2009-08-11 19:09:50

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: [Solved] DWM and extra key's.

Try adding this to your config.h

#include <X11/XF86keysym.h>

The XF86* key definitions aren't included by default.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#3 2009-08-11 19:43:11

SpeedVin
Member
From: Poland
Registered: 2009-04-29
Posts: 955

Re: [Solved] DWM and extra key's.

rson451 wrote:

Try adding this to your config.h

#include <X11/XF86keysym.h>

The XF86* key definitions aren't included by default.

Now after adding this to my config.h I got this:

In file included from dwm.c:271:
config.h:48: error: 'XF86AudioRaiseVolume' undeclared here (not in a function)
make: *** [dwm.o] Error 1

I tried with XK_XF86AudioRaiseVolume but same error with XK_XF86AudioRaiseVolume neutral


Shell Scripter | C/C++/Python/Java Coder | ZSH

Offline

#4 2009-08-11 20:14:35

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: [Solved] DWM and extra key's.

I've got a differen't definition than you, mine are in this form:

XF86XK_AudioLowerVolume


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#5 2009-08-11 21:36:00

Tillotson
Member
Registered: 2009-05-09
Posts: 23

Re: [Solved] DWM and extra key's.

Was trying the same. Couldn't compile using XF86* key names. It works for me if I use the octal code given by xev:

static const char *mutecmd[] = { "amixer", "-q", "sset", "Master", "toggle", NULL };

static Key keys[] = {
    /* modifier                     key        function        argument */
    { 0,                       0x1008ff12,      spawn,          {.v = mutecmd } },

Hope this helps smile

Offline

#6 2009-08-12 06:49:58

SpeedVin
Member
From: Poland
Registered: 2009-04-29
Posts: 955

Re: [Solved] DWM and extra key's.

rson451 wrote:

I've got a differen't definition than you, mine are in this form:

XF86XK_AudioLowerVolume

Ok with this dedinition DWM build succesful but don't react for the keys sad
Tillotson can you post your config? wink

Last edited by SpeedVin (2009-08-12 06:50:49)


Shell Scripter | C/C++/Python/Java Coder | ZSH

Offline

#7 2009-08-12 09:41:02

Tillotson
Member
Registered: 2009-05-09
Posts: 23

Re: [Solved] DWM and extra key's.

/* See LICENSE file for copyright and license details. */

/* appearance */
static const char font[]            = "-*-fixed-medium-r-*-*-18-*-*-*-*-*-iso8859-*";
static const char normbordercolor[] = "#C7C7C7";
static const char normbgcolor[]     = "#000000";
static const char normfgcolor[]     = "#888888";
static const char selbordercolor[]  = "#1793D1";
static const char selbgcolor[]      = "#000000";
static const char selfgcolor[]      = "#FFFFFF";
static unsigned int borderpx        = 1;        /* border pixel of windows */
static unsigned int snap            = 32;       /* snap pixel */
static Bool showbar                 = True;     /* False means no bar */
static Bool topbar                  = True;     /* False means bottom bar */

/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };

static Rule rules[] = {
    /* class              instance    title       tags mask     isfloating */
    { "Thunar",           NULL,        NULL,    0,          True },
    { "VirtualBox",        NULL,        NULL,    0,          True },
    { "MPlayer",        NULL,        NULL,    0,          True },
    { "Vlc",        NULL,        NULL,    0,          True },
    { "XCalc",        NULL,        NULL,    0,          True },

};

/* layout(s) */
static const float mfact      = 0.55; /* factor of master area size [0.05..0.95] */
static const Bool resizehints = True; /* False means respect size hints in tiled resizals */

static const Layout layouts[] = {
    /* symbol     arrange function */
    { "[]=",      tile },    /* first entry is default */
    { "><>",      NULL },    /* no layout function means floating behavior */
    { "[M]",      monocle },
};

/* key definitions */
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
    { MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
    { MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
    { MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
    { MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },

/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }

/* commands */
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *termcmd[]  = { "urxvtc", NULL };
static const char *browsercmd[] = { "firefox", NULL };
static const char *musiccmd[] = { "urxvtc", "-e", "ncmpcpp", NULL };
static const char *talkcmd[] = { "urxvtc", "-e", "weechat-curses", NULL };
static const char *shutcmd[] = { "sudo", "shutdown", "-h", "now", NULL };
static const char *filebrowse[] = { "thunar", NULL };
static const char *mutecmd[] = { "amixer", "-q", "sset", "Master", "toggle", NULL };
static const char *volupcmd[] = { "amixer", "-q", "sset", "PCM", "5-", "unmute", NULL };
static const char *voldowncmd[] = { "amixer", "-q", "sset", "PCM", "5+", "unmute", NULL };
static const char *calccmd[] = { "xcalc", NULL };

static Key keys[] = {
    /* modifier                     key        function        argument */
    { 0,                       0x1008ff12,      spawn,          {.v = mutecmd } },
    { 0,                       0x1008ff11,      spawn,          {.v = volupcmd } },
    { 0,                       0x1008ff13,      spawn,          {.v = voldowncmd } },
    { 0,                       0x1008ff1d,      spawn,          {.v = calccmd } },
    { MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
    { MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
    { MODKEY|ShiftMask,        XK_b,      spawn,       {.v = browsercmd } },
    { MODKEY|ShiftMask,        XK_m,      spawn,       {.v = musiccmd } },
    { MODKEY|ShiftMask,        XK_f,      spawn,       {.v = filebrowse } },
    { MODKEY|ShiftMask,        XK_t,      spawn,       {.v = talkcmd } },
    { MODKEY|ShiftMask,        XK_Delete, spawn,       {.v = shutcmd } },
    { MODKEY,                       XK_b,      togglebar,      {0} },
    { MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
    { MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
    { MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
    { MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
    { MODKEY,                       XK_Return, zoom,           {0} },
    { MODKEY,                       XK_Tab,    view,           {0} },
    { MODKEY|ShiftMask,             XK_c,      killclient,     {0} },
    { MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
    { MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
    { MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
    { MODKEY,                       XK_space,  setlayout,      {0} },
    { MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
    { MODKEY,                       XK_0,      view,           {.ui = ~0 } },
    { MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
    { MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
    { MODKEY,                       XK_period, focusmon,       {.i = +1 } },
    { MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
    { MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
    TAGKEYS(                        XK_1,                      0)
    TAGKEYS(                        XK_2,                      1)
    TAGKEYS(                        XK_3,                      2)
    TAGKEYS(                        XK_4,                      3)
    TAGKEYS(                        XK_5,                      4)
    TAGKEYS(                        XK_6,                      5)
    TAGKEYS(                        XK_7,                      6)
    TAGKEYS(                        XK_8,                      7)
    TAGKEYS(                        XK_9,                      8)
    { MODKEY|ShiftMask,             XK_q,      quit,           {0} },
};

/* button definitions */
/* click can be a tag number (starting at 0),
 * ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
    /* click                event mask      button          function        argument */
    { ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
    { ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
    { ClkWinTitle,          0,              Button2,        zoom,           {0} },
    { ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
    { ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
    { ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
    { ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
    { ClkTagBar,            0,              Button1,        view,           {0} },
    { ClkTagBar,            0,              Button3,        toggleview,     {0} },
    { ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
    { ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
};

Offline

#8 2009-08-12 09:43:57

SpeedVin
Member
From: Poland
Registered: 2009-04-29
Posts: 955

Re: [Solved] DWM and extra key's.

Tillotson wrote:
/* See LICENSE file for copyright and license details. */

/* appearance */
static const char font[]            = "-*-fixed-medium-r-*-*-18-*-*-*-*-*-iso8859-*";
static const char normbordercolor[] = "#C7C7C7";
static const char normbgcolor[]     = "#000000";
static const char normfgcolor[]     = "#888888";
static const char selbordercolor[]  = "#1793D1";
static const char selbgcolor[]      = "#000000";
static const char selfgcolor[]      = "#FFFFFF";
static unsigned int borderpx        = 1;        /* border pixel of windows */
static unsigned int snap            = 32;       /* snap pixel */
static Bool showbar                 = True;     /* False means no bar */
static Bool topbar                  = True;     /* False means bottom bar */

/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };

static Rule rules[] = {
    /* class              instance    title       tags mask     isfloating */
    { "Thunar",           NULL,        NULL,    0,          True },
    { "VirtualBox",        NULL,        NULL,    0,          True },
    { "MPlayer",        NULL,        NULL,    0,          True },
    { "Vlc",        NULL,        NULL,    0,          True },
    { "XCalc",        NULL,        NULL,    0,          True },

};

/* layout(s) */
static const float mfact      = 0.55; /* factor of master area size [0.05..0.95] */
static const Bool resizehints = True; /* False means respect size hints in tiled resizals */

static const Layout layouts[] = {
    /* symbol     arrange function */
    { "[]=",      tile },    /* first entry is default */
    { "><>",      NULL },    /* no layout function means floating behavior */
    { "[M]",      monocle },
};

/* key definitions */
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
    { MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
    { MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
    { MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
    { MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },

/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }

/* commands */
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *termcmd[]  = { "urxvtc", NULL };
static const char *browsercmd[] = { "firefox", NULL };
static const char *musiccmd[] = { "urxvtc", "-e", "ncmpcpp", NULL };
static const char *talkcmd[] = { "urxvtc", "-e", "weechat-curses", NULL };
static const char *shutcmd[] = { "sudo", "shutdown", "-h", "now", NULL };
static const char *filebrowse[] = { "thunar", NULL };
static const char *mutecmd[] = { "amixer", "-q", "sset", "Master", "toggle", NULL };
static const char *volupcmd[] = { "amixer", "-q", "sset", "PCM", "5-", "unmute", NULL };
static const char *voldowncmd[] = { "amixer", "-q", "sset", "PCM", "5+", "unmute", NULL };
static const char *calccmd[] = { "xcalc", NULL };

static Key keys[] = {
    /* modifier                     key        function        argument */
    { 0,                       0x1008ff12,      spawn,          {.v = mutecmd } },
    { 0,                       0x1008ff11,      spawn,          {.v = volupcmd } },
    { 0,                       0x1008ff13,      spawn,          {.v = voldowncmd } },
    { 0,                       0x1008ff1d,      spawn,          {.v = calccmd } },
    { MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
    { MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
    { MODKEY|ShiftMask,        XK_b,      spawn,       {.v = browsercmd } },
    { MODKEY|ShiftMask,        XK_m,      spawn,       {.v = musiccmd } },
    { MODKEY|ShiftMask,        XK_f,      spawn,       {.v = filebrowse } },
    { MODKEY|ShiftMask,        XK_t,      spawn,       {.v = talkcmd } },
    { MODKEY|ShiftMask,        XK_Delete, spawn,       {.v = shutcmd } },
    { MODKEY,                       XK_b,      togglebar,      {0} },
    { MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
    { MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
    { MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
    { MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
    { MODKEY,                       XK_Return, zoom,           {0} },
    { MODKEY,                       XK_Tab,    view,           {0} },
    { MODKEY|ShiftMask,             XK_c,      killclient,     {0} },
    { MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
    { MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
    { MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
    { MODKEY,                       XK_space,  setlayout,      {0} },
    { MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
    { MODKEY,                       XK_0,      view,           {.ui = ~0 } },
    { MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
    { MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
    { MODKEY,                       XK_period, focusmon,       {.i = +1 } },
    { MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
    { MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
    TAGKEYS(                        XK_1,                      0)
    TAGKEYS(                        XK_2,                      1)
    TAGKEYS(                        XK_3,                      2)
    TAGKEYS(                        XK_4,                      3)
    TAGKEYS(                        XK_5,                      4)
    TAGKEYS(                        XK_6,                      5)
    TAGKEYS(                        XK_7,                      6)
    TAGKEYS(                        XK_8,                      7)
    TAGKEYS(                        XK_9,                      8)
    { MODKEY|ShiftMask,             XK_q,      quit,           {0} },
};

/* button definitions */
/* click can be a tag number (starting at 0),
 * ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
    /* click                event mask      button          function        argument */
    { ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
    { ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
    { ClkWinTitle,          0,              Button2,        zoom,           {0} },
    { ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
    { ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
    { ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
    { ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
    { ClkTagBar,            0,              Button1,        view,           {0} },
    { ClkTagBar,            0,              Button3,        toggleview,     {0} },
    { ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
    { ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
};

Thank you very much I will see what I can do wink.


Shell Scripter | C/C++/Python/Java Coder | ZSH

Offline

#9 2009-08-12 09:52:33

SpeedVin
Member
From: Poland
Registered: 2009-04-29
Posts: 955

Re: [Solved] DWM and extra key's.

SpeedVin wrote:
Tillotson wrote:
/* See LICENSE file for copyright and license details. */

/* appearance */
static const char font[]            = "-*-fixed-medium-r-*-*-18-*-*-*-*-*-iso8859-*";
static const char normbordercolor[] = "#C7C7C7";
static const char normbgcolor[]     = "#000000";
static const char normfgcolor[]     = "#888888";
static const char selbordercolor[]  = "#1793D1";
static const char selbgcolor[]      = "#000000";
static const char selfgcolor[]      = "#FFFFFF";
static unsigned int borderpx        = 1;        /* border pixel of windows */
static unsigned int snap            = 32;       /* snap pixel */
static Bool showbar                 = True;     /* False means no bar */
static Bool topbar                  = True;     /* False means bottom bar */

/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };

static Rule rules[] = {
    /* class              instance    title       tags mask     isfloating */
    { "Thunar",           NULL,        NULL,    0,          True },
    { "VirtualBox",        NULL,        NULL,    0,          True },
    { "MPlayer",        NULL,        NULL,    0,          True },
    { "Vlc",        NULL,        NULL,    0,          True },
    { "XCalc",        NULL,        NULL,    0,          True },

};

/* layout(s) */
static const float mfact      = 0.55; /* factor of master area size [0.05..0.95] */
static const Bool resizehints = True; /* False means respect size hints in tiled resizals */

static const Layout layouts[] = {
    /* symbol     arrange function */
    { "[]=",      tile },    /* first entry is default */
    { "><>",      NULL },    /* no layout function means floating behavior */
    { "[M]",      monocle },
};

/* key definitions */
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
    { MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
    { MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
    { MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
    { MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },

/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }

/* commands */
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *termcmd[]  = { "urxvtc", NULL };
static const char *browsercmd[] = { "firefox", NULL };
static const char *musiccmd[] = { "urxvtc", "-e", "ncmpcpp", NULL };
static const char *talkcmd[] = { "urxvtc", "-e", "weechat-curses", NULL };
static const char *shutcmd[] = { "sudo", "shutdown", "-h", "now", NULL };
static const char *filebrowse[] = { "thunar", NULL };
static const char *mutecmd[] = { "amixer", "-q", "sset", "Master", "toggle", NULL };
static const char *volupcmd[] = { "amixer", "-q", "sset", "PCM", "5-", "unmute", NULL };
static const char *voldowncmd[] = { "amixer", "-q", "sset", "PCM", "5+", "unmute", NULL };
static const char *calccmd[] = { "xcalc", NULL };

static Key keys[] = {
    /* modifier                     key        function        argument */
    { 0,                       0x1008ff12,      spawn,          {.v = mutecmd } },
    { 0,                       0x1008ff11,      spawn,          {.v = volupcmd } },
    { 0,                       0x1008ff13,      spawn,          {.v = voldowncmd } },
    { 0,                       0x1008ff1d,      spawn,          {.v = calccmd } },
    { MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
    { MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
    { MODKEY|ShiftMask,        XK_b,      spawn,       {.v = browsercmd } },
    { MODKEY|ShiftMask,        XK_m,      spawn,       {.v = musiccmd } },
    { MODKEY|ShiftMask,        XK_f,      spawn,       {.v = filebrowse } },
    { MODKEY|ShiftMask,        XK_t,      spawn,       {.v = talkcmd } },
    { MODKEY|ShiftMask,        XK_Delete, spawn,       {.v = shutcmd } },
    { MODKEY,                       XK_b,      togglebar,      {0} },
    { MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
    { MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
    { MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
    { MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
    { MODKEY,                       XK_Return, zoom,           {0} },
    { MODKEY,                       XK_Tab,    view,           {0} },
    { MODKEY|ShiftMask,             XK_c,      killclient,     {0} },
    { MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
    { MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
    { MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
    { MODKEY,                       XK_space,  setlayout,      {0} },
    { MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
    { MODKEY,                       XK_0,      view,           {.ui = ~0 } },
    { MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
    { MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
    { MODKEY,                       XK_period, focusmon,       {.i = +1 } },
    { MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
    { MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
    TAGKEYS(                        XK_1,                      0)
    TAGKEYS(                        XK_2,                      1)
    TAGKEYS(                        XK_3,                      2)
    TAGKEYS(                        XK_4,                      3)
    TAGKEYS(                        XK_5,                      4)
    TAGKEYS(                        XK_6,                      5)
    TAGKEYS(                        XK_7,                      6)
    TAGKEYS(                        XK_8,                      7)
    TAGKEYS(                        XK_9,                      8)
    { MODKEY|ShiftMask,             XK_q,      quit,           {0} },
};

/* button definitions */
/* click can be a tag number (starting at 0),
 * ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
    /* click                event mask      button          function        argument */
    { ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
    { ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
    { ClkWinTitle,          0,              Button2,        zoom,           {0} },
    { ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
    { ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
    { ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
    { ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
    { ClkTagBar,            0,              Button1,        view,           {0} },
    { ClkTagBar,            0,              Button3,        toggleview,     {0} },
    { ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
    { ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
};

Thank you very much I will see what I can do wink.

Sadly still no reaction sad


Shell Scripter | C/C++/Python/Java Coder | ZSH

Offline

#10 2009-08-12 15:09:17

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: [Solved] DWM and extra key's.

@SpeedVin -- I think you have your keys defined incorrectly in .Xmodmap. See here for an example .Xmodmap for your multimedia keys. After you fix that, Tillotson's config should work great -- same way that it works for me.

Good luck!
Scott

Offline

#11 2009-08-12 18:32:51

SpeedVin
Member
From: Poland
Registered: 2009-04-29
Posts: 955

Re: [Solved] DWM and extra key's.

My keys doesen't responde becouse mpc stop support volume controll smile
I solved it another way by ossvol and xbindkeys that's my .xbindkeysrc:

  1 "(sh /home/user/ossvol -i 5)"
  2     m:0x0 + c:176
  3     XF86AudioRaiseVolume
  4 "(sh /home/user/ossvol -d 5)"
  5     m:0x0 + c:174
  6     XF86AudioLowerVolume
  7 "(sh /home/user/ossvol -t)"
  8     m:0x0 + c:162
  9     XF86AudioPlay

Shell Scripter | C/C++/Python/Java Coder | ZSH

Offline

#12 2009-08-12 19:40:36

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: [Solved] DWM and extra key's.

@Speedvin -- Cool smile  Well, just use amixer (see Tillotson's config) instead of mpc if you decide to move your keybindings back into dwm instead of using xbindkeys.

Scott

Offline

Board footer

Powered by FluxBB