Re: [xmonad] Issue 182 in xmonad: Key bindings should be showable

Comment #2 on issue 182 by daniel.s...@gmail.com: Key bindings should be showable http://code.google.com/p/xmonad/issues/detail?id=182 Issue 489 has been merged into this issue.

Comment #3 on issue 182 by gwe...@gmail.com: Key bindings should be showable http://code.google.com/p/xmonad/issues/detail?id=182 I vote for #3. #1 and 2 both look like they will break extensions, configs, or both, and people simply don't care about newbie documentation enough to support breakage just for their sake. #3 avoids this, so actually has a chance of getting consensus. Simplest would just be binding M-? to xmessage with a large static string specifying the defaults. Zero breakage\* and the newbies get the documentation they need; people customizing their config already know what keys they modified. Technically, we'd have to update it every time we change the default bindings. As far as I can tell, the last time a binding was added or removed (rather than fixed or improved), was almost four years ago, in March 2008 when Spencer commented out M-b which was some sort of toolbar-gap-toggle. This seems like an improvement to me. \* anyone binding M-? in their existing config will be overriding the default keymap and so will not be affected. And as far as I can tell, no one *does* - in the XMonad config archive are only two hits for `xK_slash`, both of which are not shifted and so not question-mark bindings.

Comment #4 on issue 182 by wirtwo...@gmail.com: Key bindings should be showable http://code.google.com/p/xmonad/issues/detail?id=182 Aye, #3 simply show defaults. Assuming it's not a portability nightmare, it might be better to open the XConfig terminal and echo the bindings there. It would be more readable and leave the user a terminal to work with afterward. I don't think any solution chosen has to be too perfect. Good enough is good enough. For example, the terminal may not be installed, but then again, XMessage may not be installed. And whatever key is chosen people may not think to use it till they've been told to. (Personally I'd never have thought of M-?. But I don't want to muddy the waters; that binding's fine with me.) So first person to submit a reasonable patch gets my vote, however it's implemented on whatever binding.

Comment #5 on issue 182 by abcz2.up...@gmail.com: Key bindings should be showable http://code.google.com/p/xmonad/issues/detail?id=182 Some more thoughts. 1. When you start "ratpoison" (another tiling manager) you see in the left corner a message "Welcome to ratpoison! Press Alt-? to list available commands". 2. Later I can disable such start message in ratpoison config file. 3. This http://haskell.org/haskellwiki/Image:Xmbindings.png image won't be very helpfull. Newbie searches a hotkey *for an action*, not an action *for a hotkey*. 4. Cheatsheet is required mostly for newbies, so default keybindings are enough to list in, imho. Glad, if this user-point-of-view will help!

Comment #6 on issue 182 by jesper.reenberg: Key bindings should be showable http://code.google.com/p/xmonad/issues/detail?id=182 A wild gues is that mod-? I won't work on international keyboards as '?' has nothing to do with 'shift-xK_slas' on a danish keyboard. In general there are some issues with multiple layouts etc that xmonad doesn't handle that we'll.

Comment #7 on issue 182 by allber...@gmail.com: Key bindings should be showable http://code.google.com/p/xmonad/issues/detail?id=182 Increasingly Linux distributions are not installing xmessage by default. (This may warrant being a separate bug as well, since it affects reporting errors on mod-q.)

Comment #8 on issue 182 by daniel.s...@gmail.com: Key bindings should be showable http://code.google.com/p/xmonad/issues/detail?id=182 I don't think that gwern suggested to bind it to shift+xK_slash, he just checked to see if someone bound '?' "indirectly" instead of using just xK_question, which would probably work on all layouts with a question mark.

Comment #9 on issue 182 by gwe...@gmail.com: Key bindings should be showable http://code.google.com/p/xmonad/issues/detail?id=182 Well, no one seems to bind xK_question either. I've put together a definition. It works the obvious way: I took the keymap and edited it by hand into a table of the bindings and their Haddock description, used the `unlines` idiom, and piped it into xmessage (best way to preserve the newlines, I found). you can see it run from GHCi here: http://i.imgur.com/4J2VG.png (Looks the same with the binding.) Confusingly, it doesn't seem to work for me with xK_question, but it *does* work with xK_slash, suggesting Daniel is wrong about it probably just working. So we can either just accept that - hardly worse than xmessage being missing on Ubuntu - or maybe we could bind both shift-/ and ?. I don't know if we can do that, I've never wanted to do it before. The patch is attached. Attachments: newbies.dpatch 6.1 KB

Comment #10 on issue 182 by allber...@gmail.com: Key bindings should be showable http://code.google.com/p/xmonad/issues/detail?id=182 On US keyboards, xmonad will not see xK_question because that is not bound directly; instead, programs get "?" from XLookupString(ShiftMask, XK_slash). On some other keyboards, xK_question is the directly bound key.

Comment #11 on issue 182 by gwe...@gmail.com: Key bindings should be showable http://code.google.com/p/xmonad/issues/detail?id=182 OK, so what about binding both?

Comment #12 on issue 182 by gwe...@gmail.com: Key bindings should be showable http://code.google.com/p/xmonad/issues/detail?id=182 Repeating is kind of ugly, but if we must, we must. Amended patch attached. Compiles, haven't tested. Attachments: newbies2.dpatch 6.3 KB

Updates: Status: Verified Comment #13 on issue 182 by vogt.a...@gmail.com: Key bindings should be showable http://code.google.com/p/xmonad/issues/detail?id=182 I applied gwern's #12 a couple weeks ago. It is included in 0.11. There's sort of some redundancy with contrib module X.A.NamedActions. I'm not sure anybody uses that contrib module, since people probably learn the important keybindings before they look through contrib.

Comment #14 on issue 182 by e...@ethanschoonover.com: Key bindings should be showable http://code.google.com/p/xmonad/issues/detail?id=182 Adam, fwiw I actually use X.A.NamedActions heavily, but I'm happy if there is now native support for documented key bindings. Just for the sake of use-case documentation: I'd consider myself an intermediate level XMonad user (using XMonad for several years now) and I customize my keybindings heavily and iterate regularly. NamedActions (and hopefully the new system as well) makes it easier for me to change the bindings to a new/experimental set and memorize them quickly. -Ethan
participants (1)
-
codesite-noreply@google.com