Switching the X keyboard layout to something that changes keys used bindings used by cwm(1) and back again breaks those bindings.
cwmrc does not matter, this is reproducible with `cwm -c /dev/null'; it happens on my amd64 machine where I `exec cwm' from ~/.xsession, e.g. using xenodm(1) and it also happens on a unconfigured default installation on loongson which starts with fvwm where I switch into cwm using fvwm's left-click menu "Restart>" -> "exec cwm". So installing OpenBSD with the "[default]" keyboard layout chosen in the installer and the following when running X: # wsconsctl -n keyboard.encoding us $ setxkbmap -print xkb_keymap { xkb_keycodes { include "xfree86+aliases(qwerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "pc+us+inet(pc105)+terminate(ctrl_alt_bksp)" }; xkb_geometry { include "pc(pc105)" }; }; In cwm, I can press M-slash to "Search for windows" according to the manual and this just works. When I switch to a german layout (e.g. to type "รถ" without compose keys) like this: $ setxkbmap de # wsconsctl -n keyboard.encoding us I can type them expected (while the wsconsctl switch stays the same) and M-slash also still works (while the slash is now on a different key); so far so good and as expected. Other keybindings seem to work as well (with de mappings), but I have not tested exhaustively. Switching back to the previous us keymap in X properly changes the mapping back in all my X clients and according to setxkbmap(1) is it the same as before switching to de: $ setxkbmap de # wsconsctl -n keyboard.encoding us $ setxkbmap -print xkb_keymap { xkb_keycodes { include "xfree86+aliases(qwerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "pc+us+inet(pc105)+terminate(ctrl_alt_bksp)" }; xkb_geometry { include "pc(pc105)" }; }; But what is no longer working from now is the M-slash keybinding in cwm to search for windows. Note that the slash is back where is belongs in the us keymap and typing text is expected, just cwm and this particular keybinding is messed up. To get keybindings working with the us keymap again, I need to restart cwm - either through restarting X/xenodm or by reexecuting cwm from within cwm itself through its CM-w keybinding. After reexecution and no further keymap tinkering the M-slash keybinding works again. I guess wsconsctl should be used anyway, but using setxkbmap happened out of muscle memory and so I noticed this bug rather by accident; that's the first time I've been changing encodings/layouts/keymaps in years. Do perhaps wsconsctl and setxkbmap conflict by design?