diff --git a/CHANGES.md b/CHANGES.md index 205347b6..04206b1a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -210,6 +210,11 @@ - Changed `addDescrKeys` and `addDescrKeys'` to not discard the keybindings in the current config. + * `XMonad.Prompt` + + - The `emacsLikeXPKeymap` and `vimLikeXPKeymap` keymaps now treat + `C-m` the same as `Return`. + ### Other changes ## 0.17.1 (September 3, 2022) diff --git a/XMonad/Prompt.hs b/XMonad/Prompt.hs index 190f672c..07b47f2c 100644 --- a/XMonad/Prompt.hs +++ b/XMonad/Prompt.hs @@ -1009,6 +1009,7 @@ emacsLikeXPKeymap' p = M.fromList $ , (xK_g, quit) , (xK_bracketleft, quit) , (xK_t, transposeChars) + , (xK_m, acceptSelection) ] ++ map (first $ (,) mod1Mask) -- meta key + [ (xK_BackSpace, killWord' p Prev) @@ -1058,6 +1059,9 @@ vimLikeXPKeymap' :: (XPColor -> XPColor) -- alternates. -> M.Map (KeyMask,KeySym) (XP ()) vimLikeXPKeymap' fromColor promptF pasteFilter notWord = M.fromList $ + map (first $ (,) controlMask) -- control + + [ (xK_m, acceptSelection) + ] ++ map (first $ (,) 0) [ (xK_Return, acceptSelection) , (xK_KP_Enter, acceptSelection)