diff --git a/data/gnome-shell-osk-layouts.gresource.xml b/data/gnome-shell-osk-layouts.gresource.xml
index accfb8eda..b5112919c 100644
--- a/data/gnome-shell-osk-layouts.gresource.xml
+++ b/data/gnome-shell-osk-layouts.gresource.xml
@@ -33,6 +33,7 @@
ke.json
kg.json
kh.json
+ kr.json
la.json
latam.json
lt.json
diff --git a/data/osk-layouts/kr.json b/data/osk-layouts/kr.json
new file mode 100644
index 000000000..d89f8c786
--- /dev/null
+++ b/data/osk-layouts/kr.json
@@ -0,0 +1,720 @@
+{
+ "levels": [
+ {
+ "level": "",
+ "mode": "default",
+ "rows": [
+ [
+ {
+ "label": "ㅂ",
+ "strings": [
+ "q"
+ ]
+ },
+ {
+ "label": "ㅈ",
+ "strings": [
+ "w"
+ ]
+ },
+ {
+ "label": "ㄷ",
+ "strings": [
+ "e"
+ ]
+ },
+ {
+ "label": "ㄱ",
+ "strings": [
+ "r"
+ ]
+ },
+ {
+ "label": "ㅅ",
+ "strings": [
+ "t"
+ ]
+ },
+ {
+ "label": "ㅛ",
+ "strings": [
+ "y"
+ ]
+ },
+ {
+ "label": "ㅕ",
+ "strings": [
+ "u"
+ ]
+ },
+ {
+ "label": "ㅑ",
+ "strings": [
+ "i"
+ ]
+ },
+ {
+ "label": "ㅐ",
+ "strings": [
+ "o"
+ ]
+ },
+ {
+ "label": "ㅔ",
+ "strings": [
+ "p"
+ ]
+ },
+ {
+ "iconName": "edit-clear-symbolic",
+ "keyval": "0xff08",
+ "width": 1.5
+ }
+ ],
+ [
+ {
+ "label": "ㅁ",
+ "strings": [
+ "a"
+ ]
+ },
+ {
+ "label": "ㄴ",
+ "strings": [
+ "s"
+ ]
+ },
+ {
+ "label": "ㅇ",
+ "strings": [
+ "d"
+ ]
+ },
+ {
+ "label": "ㄹ",
+ "strings": [
+ "f"
+ ]
+ },
+ {
+ "label": "ㅎ",
+ "strings": [
+ "g"
+ ]
+ },
+ {
+ "label": "ㅗ",
+ "strings": [
+ "h"
+ ]
+ },
+ {
+ "label": "ㅓ",
+ "strings": [
+ "j"
+ ]
+ },
+ {
+ "label": "ㅏ",
+ "strings": [
+ "k"
+ ]
+ },
+ {
+ "label": "ㅣ",
+ "strings": [
+ "l"
+ ]
+ },
+ {
+ "iconName": "keyboard-enter-symbolic",
+ "keyval": "0xff0d",
+ "width": 2
+ }
+ ],
+ [
+ {
+ "label": "ㅋ",
+ "strings": [
+ "z"
+ ]
+ },
+ {
+ "label": "ㅌ",
+ "strings": [
+ "x"
+ ]
+ },
+ {
+ "label": "ㅊ",
+ "strings": [
+ "c"
+ ]
+ },
+ {
+ "label": "ㅍ",
+ "strings": [
+ "v"
+ ]
+ },
+ {
+ "label": "ㅠ",
+ "strings": [
+ "b"
+ ]
+ },
+ {
+ "label": "ㅜ",
+ "strings": [
+ "n"
+ ]
+ },
+ {
+ "label": "ㅡ",
+ "strings": [
+ "m"
+ ]
+ },
+ {
+ "strings": [
+ ","
+ ]
+ },
+ {
+ "strings": [
+ ".",
+ "#",
+ "!",
+ ",",
+ "?",
+ "-",
+ ":",
+ "'",
+ "@"
+ ]
+ }
+ ],
+ [
+ {
+ "action": "levelSwitch",
+ "label": "?123",
+ "level": 2,
+ "width": 1.5
+ },
+ {
+ "action": "emoji",
+ "iconName": "face-smile-symbolic",
+ "width": 1.5
+ },
+ {
+ "strings": [
+ " "
+ ],
+ "width": 5
+ },
+ {
+ "action": "languageMenu",
+ "iconName": "keyboard-layout-symbolic",
+ "width": 1.5
+ },
+ {
+ "action": "hide",
+ "iconName": "keyboard-hide-symbolic",
+ "width": 2
+ }
+ ]
+ ]
+ },
+ {
+ "level": "opt",
+ "mode": "locked",
+ "rows": [
+ [
+ {
+ "strings": [
+ "1",
+ "¹",
+ "½",
+ "⅓",
+ "¼",
+ "⅛"
+ ]
+ },
+ {
+ "strings": [
+ "2",
+ "²",
+ "⅔"
+ ]
+ },
+ {
+ "strings": [
+ "3",
+ "³",
+ "¾",
+ "⅜"
+ ]
+ },
+ {
+ "strings": [
+ "4",
+ "⁴"
+ ]
+ },
+ {
+ "strings": [
+ "5",
+ "⅝"
+ ]
+ },
+ {
+ "strings": [
+ "6"
+ ]
+ },
+ {
+ "strings": [
+ "7",
+ "⅞"
+ ]
+ },
+ {
+ "strings": [
+ "8"
+ ]
+ },
+ {
+ "strings": [
+ "9"
+ ]
+ },
+ {
+ "strings": [
+ "0",
+ "ⁿ",
+ "∅"
+ ]
+ },
+ {
+ "iconName": "edit-clear-symbolic",
+ "keyval": "0xff08",
+ "width": 1.5
+ }
+ ],
+ [
+ {
+ "strings": [
+ "@"
+ ]
+ },
+ {
+ "strings": [
+ "#"
+ ]
+ },
+ {
+ "strings": [
+ "$",
+ "¢",
+ "£",
+ "€",
+ "¥",
+ "₱"
+ ]
+ },
+ {
+ "strings": [
+ "%",
+ "‰"
+ ]
+ },
+ {
+ "strings": [
+ "&"
+ ]
+ },
+ {
+ "strings": [
+ "-",
+ "_",
+ "–",
+ "—",
+ "·"
+ ]
+ },
+ {
+ "strings": [
+ "+",
+ "±"
+ ]
+ },
+ {
+ "strings": [
+ "(",
+ "<",
+ "{",
+ "["
+ ]
+ },
+ {
+ "strings": [
+ ")",
+ ">",
+ "}",
+ "]"
+ ]
+ },
+ {
+ "iconName": "keyboard-enter-symbolic",
+ "keyval": "0xff0d",
+ "width": 2
+ }
+ ],
+ [
+ {
+ "action": "levelSwitch",
+ "label": "=/<",
+ "level": 3,
+ "width": 1.5
+ },
+ {
+ "strings": [
+ "*",
+ "†",
+ "‡",
+ "★"
+ ]
+ },
+ {
+ "strings": [
+ "\"",
+ "“",
+ "”",
+ "«",
+ "»"
+ ]
+ },
+ {
+ "strings": [
+ "'",
+ "‘",
+ "’",
+ "‹",
+ "›"
+ ]
+ },
+ {
+ "strings": [
+ ":"
+ ]
+ },
+ {
+ "strings": [
+ ";"
+ ]
+ },
+ {
+ "strings": [
+ "!",
+ "¡"
+ ]
+ },
+ {
+ "strings": [
+ "?",
+ "¿"
+ ]
+ },
+ {
+ "action": "levelSwitch",
+ "label": "=/<",
+ "level": 3,
+ "width": 3
+ }
+ ],
+ [
+ {
+ "action": "levelSwitch",
+ "label": "ABC",
+ "level": 0,
+ "width": 1.5
+ },
+ {
+ "strings": [
+ "_"
+ ]
+ },
+ {
+ "strings": [
+ "/"
+ ]
+ },
+ {
+ "strings": [
+ " "
+ ],
+ "width": 3
+ },
+ {
+ "strings": [
+ ","
+ ]
+ },
+ {
+ "strings": [
+ ".",
+ "…"
+ ]
+ },
+ {
+ "action": "emoji",
+ "iconName": "face-smile-symbolic"
+ },
+ {
+ "action": "languageMenu",
+ "iconName": "keyboard-layout-symbolic"
+ },
+ {
+ "action": "hide",
+ "iconName": "keyboard-hide-symbolic"
+ }
+ ]
+ ]
+ },
+ {
+ "level": "opt+shift",
+ "mode": "locked",
+ "rows": [
+ [
+ {
+ "strings": [
+ "~"
+ ]
+ },
+ {
+ "strings": [
+ "`"
+ ]
+ },
+ {
+ "strings": [
+ "|"
+ ]
+ },
+ {
+ "strings": [
+ "•",
+ "♪",
+ "♥",
+ "♠",
+ "♦",
+ "♣"
+ ]
+ },
+ {
+ "strings": [
+ "√"
+ ]
+ },
+ {
+ "strings": [
+ "Π",
+ "π"
+ ]
+ },
+ {
+ "strings": [
+ "÷"
+ ]
+ },
+ {
+ "strings": [
+ "×"
+ ]
+ },
+ {
+ "strings": [
+ "¶",
+ "§"
+ ]
+ },
+ {
+ "strings": [
+ "∆"
+ ]
+ },
+ {
+ "iconName": "edit-clear-symbolic",
+ "keyval": "0xff08",
+ "width": 1.5
+ }
+ ],
+ [
+ {
+ "strings": [
+ "£"
+ ]
+ },
+ {
+ "strings": [
+ "¢"
+ ]
+ },
+ {
+ "strings": [
+ "€"
+ ]
+ },
+ {
+ "strings": [
+ "¥"
+ ]
+ },
+ {
+ "strings": [
+ "^",
+ "↑",
+ "↓",
+ "←",
+ "→"
+ ]
+ },
+ {
+ "strings": [
+ "°",
+ "′",
+ "″"
+ ]
+ },
+ {
+ "strings": [
+ "=",
+ "≠",
+ "≈",
+ "∞"
+ ]
+ },
+ {
+ "strings": [
+ "{"
+ ]
+ },
+ {
+ "strings": [
+ "}"
+ ]
+ },
+ {
+ "iconName": "keyboard-enter-symbolic",
+ "keyval": "0xff0d",
+ "width": 2
+ }
+ ],
+ [
+ {
+ "action": "levelSwitch",
+ "label": "?123",
+ "level": 2,
+ "width": 1.5
+ },
+ {
+ "strings": [
+ "\\"
+ ]
+ },
+ {
+ "strings": [
+ "©"
+ ]
+ },
+ {
+ "strings": [
+ "®"
+ ]
+ },
+ {
+ "strings": [
+ "™"
+ ]
+ },
+ {
+ "strings": [
+ "℅"
+ ]
+ },
+ {
+ "strings": [
+ "["
+ ]
+ },
+ {
+ "strings": [
+ "]"
+ ]
+ },
+ {
+ "action": "levelSwitch",
+ "label": "?123",
+ "level": 2,
+ "width": 3
+ }
+ ],
+ [
+ {
+ "action": "levelSwitch",
+ "label": "ABC",
+ "level": 0,
+ "width": 1.5
+ },
+ {
+ "strings": [
+ "<",
+ "‹",
+ "≤",
+ "«"
+ ]
+ },
+ {
+ "strings": [
+ ">",
+ "›",
+ "≥",
+ "»"
+ ]
+ },
+ {
+ "strings": [
+ " "
+ ],
+ "width": 3
+ },
+ {
+ "strings": [
+ ","
+ ]
+ },
+ {
+ "strings": [
+ ".",
+ "…"
+ ]
+ },
+ {
+ "action": "emoji",
+ "iconName": "face-smile-symbolic"
+ },
+ {
+ "action": "languageMenu",
+ "iconName": "keyboard-layout-symbolic"
+ },
+ {
+ "action": "hide",
+ "iconName": "keyboard-hide-symbolic"
+ }
+ ]
+ ]
+ }
+ ],
+ "locale": "kr",
+ "name": "Korean (Hangul)"
+}
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 840779e80..62007edec 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -1,7 +1,7 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported KeyboardManager */
-const { Clutter, Gio, GLib, GObject, Graphene, Meta, Shell, St } = imports.gi;
+const {Clutter, Gio, GLib, GObject, Graphene, IBus, Meta, Shell, St} = imports.gi;
const Signals = imports.misc.signals;
const EdgeDragAction = imports.ui.edgeDragAction;
@@ -2209,6 +2209,20 @@ var KeyboardController = class extends Signals.EventEmitter {
getCurrentGroup() {
if (Main.inputMethod.terminalMode)
return 'us-extended';
+
+ // Special case for Korean, if Hangul mode is disabled, use the 'us' keymap
+ if (this._currentSource.id === 'hangul') {
+ const inputSourceManager = InputSourceManager.getInputSourceManager();
+ const currentSource = inputSourceManager.currentSource;
+ let prop;
+ for (let i = 0; (prop = currentSource.properties.get(i)) !== null; ++i) {
+ if (prop.get_key() === 'InputMode' &&
+ prop.get_prop_type() === IBus.PropType.TOGGLE &&
+ prop.get_state() !== IBus.PropState.CHECKED)
+ return 'us';
+ }
+ }
+
return this._currentSource.xkbId;
}