answered
2015-12-03 06:41:05 +0200
AliN 6981 ●94 ●134 ●137
Ha ha, it's easier than any body could imagine!
On /usr/share/maliit/plugins/com/jolla/KeyboardBase.qml
there's a function to apply autocaps such this:
function applyAutocaps() {
if (MInputMethodQuick.surroundingTextValid
&& MInputMethodQuick.contentType === Maliit.FreeTextContentType
&& MInputMethodQuick.autoCapitalizationEnabled
&& !MInputMethodQuick.hiddenText
&& layout && layout.type === "") {
var position = MInputMethodQuick.cursorPosition
var text = MInputMethodQuick.surroundingText.substring(0, position)
if (position == 0
|| (position == 1 && text[0] === " ")
|| (position >= 2 && text[position - 1] === " "
&& ".?!".indexOf(text[position - 2]) >= 0)) {
autocaps = true
} else {
autocaps = false
}
} else {
autocaps = false
}
}
It's enough to make a condition false; for example, to add a line in layout CONF file for non-latin languages:
type="CTL"
Autocaps will be disabled only for that specific layout. :)
Edit: It is also possible to add the line to layout QML file, just below the splitSupported
. Other options such as capsLockSupported
are allowed.
Your question is a virtual duplicate of https://together.jolla.com/question/75158/option-to-disable-auto-capitalization-missing-from-input-settings/
Please consider closing your question and adding your comments and vote at the link above.
Regards,
Spam Hunter ( 2015-05-02 20:10:16 +0200 )edit@Markkyboy, I'm asking from a developer viewpoint. I’ve made layouts for those non-Latin languages and want to disable autocaps for these languages only (without affecting Latin-based languages). This is different from the option where the end-user can disable autocaps (for all layouts).
AliN ( 2015-05-03 00:40:22 +0200 )edit