@@ -59,6 +59,12 @@ QtObject {
5959 currentKeymapIndex = prevIndex;
6060 }
6161
62+ property Binding surfaceKeymapBinding: Binding { // NB: needed mainly for xmir & libertine apps
63+ target: MirFocusController.focusedSurface
64+ property: "keymap"
65+ value: root.currentKeymap
66+ }
67+
6268 property Binding unityKeymapBinding: Binding {
6369 target: Mir
6470 property: "currentKeymap"
@@ -78,7 +84,9 @@ QtObject {
7884 }
7985
8086 onCurrentKeymapIndexChanged: {
81− actionGroup.currentAction.updateState(currentKeymapIndex);
87+ if (actionGroup.currentAction.valid) {
88+ actionGroup.currentAction.updateState(currentKeymapIndex);
89+ }
8290 }
8391
8492 readonly property int activeActionState: actionGroup.activeAction.valid ? actionGroup.activeAction.state : -1