Issue 608 in xmonad: EZConfig `exchangeKeys` function

Status: New Owner: ---- New issue 608 by Ephro...@gmail.com: EZConfig `exchangeKeys` function https://code.google.com/p/xmonad/issues/detail?id=608 There should be an exchangeKeys function to swap two keys without needing to copy their implementation. Here is my try of an implementation, but I couldn’t get it working, it compiles but nothing happens. Probably a simple logical error. exchangeKeys :: XConfig a -> ((KeyMask, KeySym), (KeyMask, KeySym)) -> XConfig a exchangeKeys conf (map, map') = conf { keys = \cnf -> let -- fwd = M.findWithDefault $ pure () fwd map keys = keys M.! map oldKeys = keys conf cnf (com, com') = (fwd map oldKeys, fwd map' oldKeys) in M.insert map com' $ M.insert map' com oldKeys } There should be `exchangeKeysP`, too. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings

Comment #1 on issue 608 by byor...@gmail.com: EZConfig `exchangeKeys` function https://code.google.com/p/xmonad/issues/detail?id=608 Hi, thanks! I will take a look at this if no one else gets around to it in the meantime, but I may not get to it for a few weeks since I will be moving across the country and travelling. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings

Comment #2 on issue 608 by Ephro...@gmail.com: EZConfig `exchangeKeys` function https://code.google.com/p/xmonad/issues/detail?id=608 Oh, and the commented-out fwd is the right one. I tried to make it crash with (!), but that didn’t work somehow. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings
participants (1)
-
codesite-noreply@google.com