Re: Issue 69 in xmonad: Key binding improvements

Comment #9 on issue 69 by mark.stosberg: Key binding improvements http://code.google.com/p/xmonad/issues/detail?id=69 I'm struggling to try Xmonad because I don't have a windows key and the "loving caress" of xmodmap (as the original poster puts it) is not so gentle. As someone new to Xmonad and Haskell, the "sufficient" workaround is not simple at all: - delete all of the default keybindings - add a single keybinding for your desired prefix key that activates a submap - add all the desired keybindings to your submap I wouldn't know how to start with implementing that. I even tried the "extra user-friendly" BlueTile alternative. It also assumed I had a Windows key... -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings

Comment #10 on issue 69 by korp...@korpios.com: Key binding improvements http://code.google.com/p/xmonad/issues/detail?id=69 On my system, at least, my left and right modifier keys of the same type (e.g., "alt", "shift") are seen by X as different keys; this leaves open the possibility of using one of the two for Xmonad, and the other for its original purpose. You can check by running "xev" and seeing what key code you get when you press those keys; if they are indeed different, and if you are amenable to the idea (e.g., if you notice you always use only the left or right version of that key), you should be able to write a much simpler xmodmap than "delete and re-add everything" which gets you what you want. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings

Comment #11 on issue 69 by kekito.fig: Key binding improvements http://code.google.com/p/xmonad/issues/detail?id=69 There's a really simple way to do this! I'm surprised the example isn't in a FAQ somewhere, but this issue shows up first on Google for "xmonad prefix key", so I'm adding the code here. Tailor to your preference. The tuple passed to prefixKey is a regular xmonad-style (modifier, keycode) tuple. In this file, I use an unmodded Escape key as my prefix, and strip the modifier from the usual keybindings by setting modMask to 0. So, where a keybinding used to be (modMask, keycode), I've changed it to the moral equivalent of [(0, xK_Escape), (0, keycode)]. Have fun, and happy hacking! P.S. Haskell's type system rules. As soon as I got this to compile, it Just Worked. :) Attachments: xmonad.hs 276 bytes

Comment #12 on issue 69 by kekito.fig: Key binding improvements http://code.google.com/p/xmonad/issues/detail?id=69 Here's a minor enhancement: factor the code a little better, and allow PREFIX-PREFIX to send the prefix char to the client window. Attachments: xmonad.hs 499 bytes

Comment #13 on issue 69 by kekito.fig: Key binding improvements http://code.google.com/p/xmonad/issues/detail?id=69 I deleted the previous attachment because it had a major bug that broke mouse bindings. Here's a better factored version, and also allows PREFIX-PREFIX to send the PREFIX char to the client window. Attachments: xmonad.hs 1.3 KB
participants (1)
-
codesite-noreply@google.com