[SOLVED] xmodmap+binding problem

[code]
DestroyFunc InitFunction
AddToFunc InitFunction

  • I Exec xmodmap -e “keycode 115 = Super_L”
  • I Exec xmodmap -e “keycode 116 = Super_L”
  • I Exec /usr/local/libexec/gnome-settings-daemon #–disable-sound
  • I Exec xmodmap -e “keycode 176 = F13”
  • I Exec xmodmap -e “keycode 174 = F14”
  • I Exec xmodmap -e “keycode 140 = F15”
  • I Exec xmodmap -e “keycode 237 = F16”
  • I Exec xmodmap -e “keycode 162 = F17”
  • I Exec xmodmap -e “keycode 178 = F18”
  • I Exec xmodmap -e “keycode 236 = F19”
  • I Exec xmodmap -e “keycode 153 = F20”
  • I Exec xset r rate 250 50
  • I Exec xset m 3/1 4
  • I Exec numlockx on
  • I Exec trayer --edge bottom --align right --widthtype request --transparent true --expand true --alpha 256
  • I Exec nvidia-settings -l
    #+ I Exec pidgin
  • I Exec $[BROWSER]
  • I Exec gkrellm[/code]

For some reason these doesn’t work:

key F13 A N Exec echo "volume +1" > /home/killasmurf/.mplayer/pipe key F14 A N Exec echo "volume -1" > /home/killasmurf/.mplayer/pipe key F15 A N Exec echo "mute" > /home/killasmurf/.mplayer/pipe ##Media key #key F16 A N key F17 A N Exec echo "pause" > /home/killasmurf/.mplayer/pipe key F18 A N Exec $[BROWSER] key F19 A N Exec $[EMAILER] key F20 A N Exec $[TERMINAL]

while this work:

Key I W 4 Module FvwmIdent Key C A 4 Exec $[CALCULATOR] key B A 4 Exec $[BROWSER] Key E A 4 Exec $[EDITOR] Key F A 4 Exec $[FILER] Key V A 4 Exec $[VIDEO_PLAYER] Key P A 4 Exec $[PLAYER]

Note:
MOD4=Super_L in my config, which is win_key

My custom keys on keyboard doesn’t work.
They did work, when i did manual xmodmap in terminal
Also they seam to work if i add them to RestartFunction and restart FVWM

Any ideas where i went wrong?

Edit: Just checked with xev that keys were defined…
Edit2: when i rebind key in FvwmTerm it works fine

  1. Read this:

viewtopic.php?f=40&t=1505

And realise why you shouldn’t use InitFunction, and how to replace it using StartFunction.

  1. In the case of your xmodmap commands, consider using ~/.xmodmaprc instead.

  2. What does numlockx do? Confer what IgnoreModifiers does in FVWM, and just don’t turn on numlock.

Point 3., is the ultimate cause and fix for your problem.

– Thomas Adam

I did tried StartFunction as well, it didn’t work…
Actually bough init and startfunction works OK, as i saw in results of xev when i press my keys… they were assigned.
The problem lies in Bindings for some reason.
I just run another simple test:
in FvwmConsole:

read Bindings.conf

and after this all keys worked well as they should

Xnumlock turns on numlock, which i like to use A LOT

I prefer using xmodmap, because then if i break things hard, and just reinstall my system (windows style… sometimes faster than solving problem), i don’t have to care about that file, i just extract backup of my fvwm config and everything works out of the box.

also i have

IgnoreModifiers L25

in my config

P.S. haven’t read your article, will do in next 5 min

EDIT:

I edited my Startup.conf

[code]DestroyFunc StartFunction
AddToFunc StartFunction

  • I test (init) Exec /usr/local/libexec/gnome-settings-daemon #–disable-sound
  • I test (init) Exec xmodmap -e “keycode 115 = Super_L”
  • I test (init) Exec xmodmap -e “keycode 116 = Super_L”
  • I test (init) Exec xmodmap -e “keycode 176 = F13” #keyboard specific
  • I test (init) Exec xmodmap -e “keycode 174 = F14” #keyboard specific
  • I test (init) Exec xmodmap -e “keycode 140 = F15” #keyboard specific
  • I test (init) Exec xmodmap -e “keycode 237 = F16” #keyboard specific
  • I test (init) Exec xmodmap -e “keycode 162 = F17” #keyboard specific
  • I test (init) Exec xmodmap -e “keycode 178 = F18” #keyboard specific
  • I test (init) Exec xmodmap -e “keycode 236 = F19” #keyboard specific
  • I test (init) Exec xmodmap -e “keycode 153 = F20” #keyboard specific
  • I test (init) Exec xset r rate 250 50
  • I test (init) Exec xset m 3/1 4
  • I test (init) Exec numlockx on
  • I test (init) Exec trayer --edge bottom --align right --widthtype request --transparent true --expand true --alpha 256
  • I test (init) Exec nvidia-settings -l
    #+ I test (init) Exec pidgin
  • I test (init) Exec $[BROWSER]
  • I test (init) Exec gkrellm
  • I Module FvwmPager 0 5
    [/code]
    Seams to work ok…, but this still it different case, and i have to reread Bindings.conf in order to use those keys

EDIT2: could it be that F13+ keys are unavailable at fvwm initialization time?

viewtopic.php?f=37&t=1667&start=0&st=0&sk=t&sd=a

Summary: Use ~/.xmodmaprc – and start xmodmap before FVWM.

Thanks for searching the forums.

– Thomas Adam

OK, any ideas how to do it correctly?
I’m using gdm to start fvwm session
i have /usr/local/share/xsessions/fvwm.desktop file:

[Desktop Entry] Encoding=UTF-8 Name=fvwm2 Comment=This session starts the fvwm window manager Exec=fvwm2 Icon= Type=Application

I added another Exec before fvwm2 and it seam to work (xmodmap dialog popped out on 1st time)

[Desktop Entry] Encoding=UTF-8 Name=fvwm2 Comment=This session starts the fvwm window manager Exec=xmodmap Exec=fvwm2 Icon= Type=Application

but i still ain’t got the result i need.

Maybe i’m dumb, but i think we’re doing wrong thing here… This problem really doesn’t seam to be xmodmap related…
is .xinitrc used when i use gdm to start fvwm session?

P.S. i did read that topic, in case you wonder… maybe i didn’t understand something

EDIT:
i just checked .xsession-errors

[fvwm][ParseBinding]: <<ERROR>> No such key: F13
[fvwm][ParseBinding]: <<ERROR>> No such key: F14
[fvwm][ParseBinding]: <<ERROR>> No such key: F15
[fvwm][ParseBinding]: <<ERROR>> No such key: F17
[fvwm][ParseBinding]: <<ERROR>> No such key: F18
[fvwm][ParseBinding]: <<ERROR>> No such key: F19
[fvwm][ParseBinding]: <<ERROR>> No such key: F20

just as i thought

No – ~/.xsession is though if you use the failsafe option.

#!/bin/sh
xmodmap .....
exec fvwm

I’ve told you the solution and the reasons – you just need to piece them together.

– Thomas Adam

in GDM i only have failsafe-Gnome and failsafe-terminal, as far as i see, bough ain’t what i need

I could use XDM, if anyone know where can i get info on how to configure it’s creepy default look.

Go read the Gentoo forums, these forums (searching for ‘xdm’) and the ArchLinux forums.

– Thomas Adam

Hi,
or you feed google with something like “xdm theme”.
You get a long list of interesting links.
Greets

Finally i had enought time to mess with XDM etc…
It did work…
I can finally use multimedia keys…

Thanks Thomas