<div dir="ltr">In short: I&#39;ve thrown a script together that executes the xmodmap command needed to completely disable to numlock key. What this script does is make sure that xmonad is up and running _before_ xmodmap is called. Combined with Adam&#39;s addition to my handleEventHook in xmonad.hs I&#39;ve now managed to squash the numlock key into oblivion.<div>
<br></div><div style>Mission accomplished!</div><div style><br></div><div style>I can&#39;t say I like this solution, but at least it gets the job done.</div><div style><br></div><div style>I would still very much prefer if this could&#39;ve been fixed in xmonad.hs, or if xmonad would just let me do my xmodmap&#39;ing without destroying my mod key, but as that does not seem to be possible, I&#39;ll settle for second best.</div>
<div style><br></div><div style>So if anybody else out there is having this problem, a bit of BASH will solve it. Just make sure you have this in your handleEventHook:</div><div style><br></div><div style>( \e -&gt; case e of</div>
<div style>      MappingNotifyEvent {} -&gt; return (All False)</div><div style>      _ -&gt; mempty)</div><div style><br></div><div style>and that your xmodmap calls are done _after_ xmonad is fully loaded. I call my script from .xinitrc just before I start xmonad. The script is backgrounded and it simply loops until it finds a running xmonad instance.</div>
<div style><br></div><div style>:o)</div><div style>Thomas Løcke</div></div>