Commit 815366fd authored by Jimmy Huguet's avatar Jimmy Huguet

Loopen: reintroduce character combination for accent back, improve submenu

parent 2193f11c
......@@ -31,22 +31,31 @@ Item {
property bool is8Pen: true
property var subMenu: {
"e": ["é", "ê", "ë", "è"],
"E": ["É", "Ê", "Ë", "È"],
"a": ["á", "â", "ä", "à", "å", "ã"],
"A": ["Á", "Â", "Ä", "À", "Å", "Ã"],
"o": ["ó", "ô", "ö", "ò", "õ"],
"O": ["Ó", "Ô", "Ö", "Ò", "Õ"],
"i": ["í", "î", "ï", "ì"],
"I": ["Í", "Î", "Ï", "Ì"],
"u": ["ú", "û", "ü", "ù", ],
"U": ["Ú", "Û", "Ü", "Ù"],
"y": ["ý", "ÿ"],
"Y": ["Ý", "Ϋ"],
"n": ["ñ"],
"N": ["Ñ"],
"c": ["ç"],
"C": ["Ç"]
"´": ["é", "É", "á", "Á", "ó", "Ó", "í", "Í", "ú", "Ú", "ý", "Ý"],
"^": ["ê", "Ê", "â", "Â", "ô", "Ô", "î", "Î", "û", "Û"],
"¨": ["ë", "Ë", "ä", "Ä", "ö", "Ö", "ï", "Ï", "ü", "Ü", "ÿ", "Ϋ"],
"`": ["è", "È", "à", "À", "ò", "Ò", "ì", "Ì", "ù", "Ù"],
"°": ["å", "Å"],
"~": ["ã", "Ã", "õ", "Õ", "ñ", "Ñ"],
"¸": ["ç", "Ç"]
}
property var accentMap: {
"e": {"´": "é", "^": "ê", "¨": "ë", "`": "è"},
"E": {"´": "É", "^": "Ê", "¨": "Ë", "`": "È"},
"a": {"´": "á", "^": "â", "¨": "ä", "`": "à", "°": "å", "~": "ã"},
"A": {"´": "Á", "^": "Â", "¨": "Ä", "`": "À", "°": "Å", "~": "Ã"},
"o": {"´": "ó", "^": "ô", "¨": "ö", "`": "ò", "~": "õ"},
"O": {"´": "Ó", "^": "Ô", "¨": "Ö", "`": "Ò", "~": "Õ"},
"i": {"´": "í", "^": "î", "¨": "ï", "`": "ì"},
"I": {"´": "Í", "^": "Î", "¨": "Ï", "`": "Ì"},
"u": {"´": "ú", "^": "û", "¨": "ü", "`": "ù"},
"U": {"´": "Ú", "^": "Û", "¨": "Ü", "`": "Ù"},
"y": {"´": "ý", "¨": "ÿ"},
"Y": {"´": "Ý", "¨": "Ϋ"},
"n": {"~": "ñ"},
"N": {"~": "Ñ"},
"c": {"¸": "ç"},
"C": {"¸": "Ç"}
}
property string lastAccentMerge: ""
......@@ -305,23 +314,16 @@ Item {
}
function commitText(text) {
MInputMethodQuick.sendCommit(text)
lastAccentMerge = ""
/*if (text in accentMap) {
var previousChar = MInputMethodQuick.surroundingText.charAt(MInputMethodQuick.surroundingText.length - 1)
if (previousChar in accentMap[text]) {
var merge = accentMap[text][previousChar]
lastAccentMerge = previousChar + text
MInputMethodQuick.sendKey(Qt.Key_Backspace, 0, "\b", Maliit.KeyClick)
MInputMethodQuick.sendCommit(merge)
} else {
MInputMethodQuick.sendCommit(text)
lastAccentMerge = ""
}
var previousChar = MInputMethodQuick.surroundingText.charAt(MInputMethodQuick.surroundingText.length - 1)
if (previousChar in accentMap && text in accentMap[previousChar]) {
var merge = accentMap[previousChar][text]
lastAccentMerge = previousChar + text
MInputMethodQuick.sendKey(Qt.Key_Backspace, 0, "\b", Maliit.KeyClick)
MInputMethodQuick.sendCommit(merge)
} else {
MInputMethodQuick.sendCommit(text)
lastAccentMerge = ""
}*/
}
}
function backSpace() {
......
This diff is collapsed.
......@@ -43,7 +43,7 @@ KeyboardLoopenLayout {
"180-left": ["s", "k", "q"],
"180-right": ["t", "a", "x"],
"240-left": ["n", "l", "£"],
"240-right": ["m", "y", "\""],
"240-right": ["m", "y", "´"],
"300-left": ["r", "b", "'"],
"300-right": ["d", "w", "&"]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment