You are not logged in.
I'm trying to bind the F-keys for few functions by declaring those keys like "XK_F1", but it doesn't work.
Though, the calling "q" and "w" keys like "XK_q" "XK_w" works normal (for the same function).
Maybe, the F-keys should called by different names, but I don't know how exactly and google doesn't help me either.
Any help appreciated.
Last edited by lightgreenpanda (2011-11-17 21:33:37)
Offline
Hi,
I'm using the following in my config.h and it works fine:
{ MODKEY, XK_F12, spawn, {.v = scratchpadcmd} },
{ MODKEY|ShiftMask, XK_F12, spawn, {.v = scratchpadtiledcmd} },
{ MODKEY, XK_F5, spawn, {.v = scratchpadcmd} },
{ MODKEY|ShiftMask, XK_F5, spawn, {.v = scratchpadtiledcmd} },Can you post your config.h with your attempts to bind the keys?
Offline
It works fine for me, so I don't know what your problem is I must confess...
{ MODKEY, XK_F1, spawn, {.v = termcmd } },
{ MODKEY, XK_F2, spawn, {.v = wwwcmd } },
{ MODKEY, XK_F12, spawn, {.v = haltcmd } },
{ MODKEY, XK_F11, spawn, {.v = rebootcmd } },
{ MODKEY, XK_Escape, killclient, {0} },
{ 0, 0x1008ff13,spawn, {.v = volupcmd } },
{ 0, 0x1008ff11,spawn, {.v = voldowncmd } },
{ 0, 0x1008ff12,spawn, {.v = volmutecmd } },Please post me an example that dosen't work for you, and i'll test it out on my end ...
-- EDIT --
Forgot to refresh the page and so haden't seen knopwob allready providing help...
Last edited by mhertz (2011-11-18 00:08:38)
Offline
Sorry for this question, it was my silly fault. I forgot what I'm using alias in .bashrc "mpc" -> "ncmpcpp" and i was trying to call "mpc" instead of "ncmpcpp", meanwhile dwm-config didn't know about my aliases so no wonder why my config didn't work.
Anyway thanks for your replies, now all works right.
static const char *mpcnext[] = { "ncmpcpp", "next", NULL };
static const char *mpcprev[] = { "ncmpcpp", "prev", NULL };
static const char *mpctoogle[] = { "ncmpcpp", "toggle", NULL }; { 0, XK_F4, spawn, {.v = mpctoogle } },
{ 0, XK_F6, spawn, {.v = mpcprev } },
{ 0, XK_F7, spawn, {.v = mpcnext } },Offline
static const char *haltcmd[] = { "sudo /sbin/shutdown -p now", NULL };
static const char *rebootcmd[] = { "sudo /sbin/shutdown -r now", NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY, XK_w, spawn, {.v = browsecmd } },
{ MODKEY, XK_F11, spawn, {.v = rebootcmd } },
{ MODKEY, XK_F12, spawn, {.v = haltcmd } },
...
};
Why donot XK_F11/XK_F12 work for me ?
e^(π⋅i) + 1 = 0
Offline
Please use code tags: you can click on the BBCode at the bottom left of your text box to see examples…
Your keybinds don't work because you haven't formatted the commands correctly. Look at the mpc examples
in the post above and note how the quotation marks and commas are used to break up the commands.
Offline