This appears to be a surprisingly complex problem, and worse, I'm not sure if it was a configuration change that I made or if it was an update to ubuntu that caused the problem. I'm running Ubuntu Studio 14.04, all the latest updates (Linux version 3.13.0-30-lowlatency (buildd@kissel)), on an Asus K55A. Here's what happened:My keyboard lost some keys (due to extreme tropical humidity), namely the main enter key.Using the numpad enter key (KPEN) didn't work in vim (I don't know how vim intterpreted the keycode that it sent (which was 104), but it kept inserting an M)Thus, I dug into my xkb files and changed all KPEN mappings from KP_enter to ReturnSimultaneously, I executed a bunch of backlogged updates that I hadn't done for the last month due to low bandwidth.At some point after these two events, my KP Enter key started working in vim (presumably because of the changes I made), but I stopped being able to switch keyboard layouts.Now, here's a more detailed description of the problem:In my config, I have - and have had, since nothing has changed in my config - my default keyboard layout as EN_US and a secondary layout as LATAM (spanish). To switch between them, I use shift+caps lock. The xfce4-xkb-plugin worked as expected.After this mysterious event, my config still looks identical, but pushing shift+caps lock does nothing but activate caps lock. Also, the xfce4-xkb-plugin doesn't show any other layout options, despite there being a second layout defined in my keyboard settings.And here's what I've done for diagnostics:Used a different keyboard. Fail: the  problem persists (and didn't expect otherwise, since all symptoms point to a software problem)Configured only latam layout in my keyboard settings (i.e., removed the us keyboard as an option). Fail: keyboard layout was still in english.Switched to TTY1 using  ctrl+alt+F1 and entered sudo loadkeys latam. Success: latam characters work.Switched back to TTY7 (i.e., my desktop environment), fail: found keyboard was still in english.In my desktop environment, I opened up xterm and did sudo loadkeys latam again. Fail: No errors, but didn't work either.I then did sudo loadkeys --verbose latam > /tmp/latam.keys and sudo loadkeys --verbose us > /tmp/us.keys and ran a diff on the two files to verify that they were indeed different. The files were different (this makes sense, and suggests that loadkeys is doing its job correctly).I then created a new account, test-me, and logged in to see if the problem was system wide. Fail: the problem is system-wide. There was no way to switch layouts.Searched for xkb in processes list. Nothing showed up. Maybe that's normal, but I at least expected an xkb daemon to handle translations and stuff.I ran setxkbmap -v 10 latam. Fail: I got the following output:setxkbmap -v 10 latamSetting verbose level to 10locale is CWarning! Multiple definitions of keyboard layout   Using command line, ignoring X serverTrying to load rules file ./rules/evdev...Trying to load rules file /usr/share/X11/xkb/rules/evdev...Success.Applied rules from evdev:rules:      evdevmodel:      pc105layout:     latamTrying to build keymap using the following components:keycodes:   evdev+aliases(qwerty)types:      completecompat:     completesymbols:    pc+latam+inet(evdev)geometry:   pc(pc105)Error loading new keyboard descriptionUnfortunately, I don't know a whole lot about the key translation subsystem, so I'm a bit stuck now. What it looks like to me is that maybe for some reason the system is just discarding the whole user config and falling back on the system settings, but then I don't know why loadkeys wouldn't work in xterm.Anyway, I'll leave it at that. I'll be happy to provide any new information. Thanks!-kael
Can no longer switch keyboard layouts in xfce
keyboard layout;xkb