--- ./js/ui/status/keyboard.js 2018-07-18 23:01:36.000000000 +0200 +++ /var/ports/work/usr/ports/x11/gnome-shell/work/gnome-shell-3.28.3/js/ui/status/keyboard.js 2019-02-02 17:41:29.229662000 +0100 @@ -245,6 +245,20 @@ id += '+' + variants[i]; sourcesList.push({ type: INPUT_SOURCE_TYPE_XKB, id: id }); } + + // FreeBSD: systemd-localed is absent, so the above sourcesList, + // which would otherwise come from org.freedesktop.locale1, is + // empty. As a fallback, retrieve the input source from the + // current locale. + + let _keyboardManagerLayout = KeyboardManager.getKeyboardManager()._getLocaleLayout(); + if (_keyboardManagerLayout) { + let _kMLid = _keyboardManagerLayout.layout; + if (!!_keyboardManagerLayout.variant) + _kMLid = _kMLid + '+' + _keyboardManagerLayout.variant; + sourcesList.push({ type: INPUT_SOURCE_TYPE_XKB, id: _kMLid }); + } + return sourcesList; },