Keyboard and Emoji Viewer menu vs. Input menu

emojihigh sierrainput-sourcemenu bar

I'm using macOS High Sierra (10.13.6) on a MacBook Pro 15. In the Keyboard Preferences pane, I have "Show keyboard and emoji viewers in menu bar" option in the "Keyboard" tab turned on:

Show keyboard and emoji viewers in menu bar

Sure enough, as desired, there's a menubar icon that, when clicked shows these in a menu:

Keyboard and Emoji Viewers menu

Here's the strange thing: sometimes that icon is the "window with command key icon" icon:

enter image description here

and sometimes it's a US flag:

enter image description here

When it's a flag, clicking it turns it back to the "window with command key icon" icon, and shows the previous menu.

My guess is that this is triggered by my having the "Show Input menu in menu bar" option in the Keyboard Preferences' "Input Sources" tab turned on:

enter image description here

If I turn "Show keyboard" off and leave "Show Input menu" on, then the icon stays a US Flag, and reliably shows an input menu:

enter image description here

So: any idea why these two menus can't coexist, and that the "Show viewers" option (mostly) overrides the "Input sources" optoin? Is this a macOS bug?

Best Answer

I don't know exactly when Apple changed the behaviour of the icon in the menu bar (somewhere between Yosemite and High Sierra?).

To recover a flag always telling you which is the keyboard in use, here is my workaround:

In:

System Preferences > Keyboard > Input Sources

add another keyboard mapping with the lower left + button.