aboutsummaryrefslogtreecommitdiffstats
path: root/src/virtualkeyboard/settings.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make hide behavior of qt vkb configurable through its settingsSanthosh Kumar2024-03-121-2/+20
| | | | | | | | | | | | | | | The patch 6da66ff611902d8c4d485568d746f49c69f1330f (introdued in Qt6) changed the behavior to handle the hide through platform plugins. But this cause issue for some users, with the concern that the qt virtual keyboard hides after input accepted in Qt5 and not in Qt6. This patch introduced new virtual keyboard settings property closeOnReturn to control the hiding behavior of virtual keyboard. Task-number: QTBUG-112963 Change-Id: Ia9433a7fe14eb896758e05f0943ad461f2790a98 Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* Remove repetitive names from KeyboardFunctionKeys enum valuesJarkko Koivikko2023-06-261-1/+1
| | | | | | | | This change was made based on feedback on Qt 6.6 api review. Pick-to: 6.6 Change-Id: I13ea8314708a97258dcef1c17961022e1f422025 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rename KeyboardFunctionKeyFlag and KeyboardFunctionKeyJarkko Koivikko2023-06-091-3/+3
| | | | | | | | | | | | | | | | | | These changes were made based on feedback on Qt 6.6 api review. - Rename QFlags class KeyboardFunctionKey to KeyboardFunctionKeys - Rename enum class KeyboardFunctionKeyFlag to KeyboardFunctionKey - Rename enum value QtVirtualKeyboard.NoFunctionKey to NoFunctionKeys Also: - don't pass QFlags by cref, pass them by value - change include order. This change amends commit 4ef502b77eedf1ec1683535143c01c43f4abfaf2 Pick-to: 6.6 Change-Id: I80736365b2fc5db53ae71b1b5e0ae141e9c804f5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Restore language and hide function keysJarkko Koivikko2023-05-091-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | Commit adeb526a39433943f2843c0fd0276de428bc6ea2 was a major update to all existing layouts with a goal to modernize the look and make the layouts symmetrical in appearance. The change also organized some of the functionality and combined the functionality of language switch, hide keyboard and handwriting mode switch keys to new gear popup menu accessible by long press comma key. However, there has been complaints that this solution is not very user friendly. This change brings back the language and hide keys. It will also make them configurable through VirtualKeyboardSettings.visibleFunctionKeys property, which allows to hide them for more compact look. Some special layouts, such as digits input will always have the keys visible regardless of the setting, because the particular layouts depend on their visibility. Therefore, the visibility is always true. Fixes: QTBUG-112964 Change-Id: Ic5db14cf8b523ff71a783172b3cb301caa05daab Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-141-28/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: Iaeb3cb05cd781031a35e40f712805fa265116076 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add new settings defaultInputMethodDisabled, defaultDictionaryDisabledJarkko Koivikko2021-01-291-1/+35
| | | | | | | | [ChangeLog] Add new settings VirtualKeyboardSettings.defaultInputMethodDisabled and VirtualKeyboardSettings.defaultDictionaryDisabled. Change-Id: Ica735c1072bb87d97f9cc9a0fb515d3eb6da2aa2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add new setting for disabling handwriting modeJarkko Koivikko2021-01-291-1/+18
| | | | | | | | | | This property allows to disable handwriting mode at runtime. [ChangeLog] Add new setting VirtualKeyboardSettings.disableHandwritingMode, which allows to disable handwriting mode at runtime. Change-Id: I5f057cccb6d6e88470d01f43e8f4735fdd436f30 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add new setting for input method hintsJarkko Koivikko2021-01-291-0/+16
| | | | | | | | | | | This property allows to set persistent input method hints. [ChangeLog] Add new setting VirtualKeyboardSettings.inputMethodHints, which allows the application to set persistent application wide input method hints. Change-Id: Iaa54a360d80c5def88f53aa8b8510c7cf041208c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add new setting for handwriting timeoutJarkko Koivikko2021-01-291-1/+35
| | | | | | | | | | | | | - Added new properties VirtualKeyboardSettings.hwrTimeoutForAlphabetic and VirtualKeyboardSettings.hwrTimeoutForCjk. - The usage of these properties depends on the plugins (e.g. T9 Write). [ChangeLog] Add new settings VirtualKeyboardSettings.hwrTimeoutForAlphabetic and VirtualKeyboardSettings.hwrTimeoutForCjk to allow the application to adjust the handwriting recognition timeout. Change-Id: Id80de20c3ebc8ff97741cf6514b987070d55d66e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add new setting for user data pathJarkko Koivikko2021-01-271-2/+37
| | | | | | | | | | | | | | | - The default userDataPath is set to QStandardPaths::GenericConfigLocation. - Add a signal for application to indicate user data reset. [ChangeLog] Added new property to settings VirtualKeyboardSettings.userDataPath. This allows the application or middleware to change the path to user files at runtime. Added also a signal to indicate user data reset - when the application triggers the signal, the virtual keyboard closes all files in the user's directory. Change-Id: I248a5b08c86b3fe7124a8d3f362c8f72e07b92c0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Use module include path instead of local include pathJarkko Koivikko2018-08-071-1/+1
| | | | | | | | Include all the virtual keyboard header files using module include path. Change-Id: I93eada70edeb66313b05df6cecf6a9412d7bc0c4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Modularize virtual keyboard and add an extension interfaceJarkko Koivikko2018-08-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the extension interface it is possible to add new input method and/or languages without recompiling the Qt Virtual Keyboard plugin itself. The existing input methods are now isolated into plugins. So installing a new input method is a matter of copying the corresponding extension plugin to the plugins/virtualkeyboard directory (and any collateral required by the extension plugin itself). This change also renames the HunspellInputMethod to DefaultInputMethod. This change is necessary because some other extension plugin may want to provide the default input method instead. Implementation plan =================== [x] Create virtualkeyboard-private module [x] Create plugin library [x] Define interface for input method plugin [x] Define interface for keyboard layouts [x] Move existing input methods and layouts to plugins [x] HangulInputMethod [x] HunspellInputMethod [x] Maybe create a private library for sharing between HunspellInputMethod and LipiInputMethod [x] LipiInputMethod [x] OpenWnnInputMethod [x] PinyinInputMethod [x] T9WriteInputMethod [x] TCInputMethod [o] Rename some C++ classes (too generic name?) [x] Think again replacing the QtVirtualKeyboard namespace [x] Update documentation [x] General instructions for creating a plugin [x] For the C++ interfaces too (previously removed) [ChangeLog][Important Behavior Changes] Introduce an extension interface for the virtual keyboard. All the current input methods and some special keyboard layouts (e.g. Hunspell, OpenWnn, etc.) have been moved to extensions. The extension interface allows third party to create a new input method without having to modify or rebuild the virtual keyboard. In addition, this change makes it possible to add features and languages independently by copying the desired extension to the system. [ChangeLog][Important Behavior Changes] Introduce a virtualkeyboard module, which can be linked against an extension plugin. This module provides the C++ API necessary for creating an input method. [ChangeLog][Important Behavior Changes] Wrap the entire virtual keyboard API into Qt namespace (e.g. QT_BEGIN_NAMESPACE/QT_END_NAMESPACE). Task-number: QTBUG-57602 Change-Id: I449f4429109f596a7a1df7517c81f97d4aada27c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add full screen input mode for super wide screensJarkko Koivikko2017-01-301-1/+18
| | | | | | | | | | | | | In full screen mode the virtual keyboard replicates the contents of the focused input field to full screen input field located on top of keyboard. This mode can be activated by VirtualKeyboardSettings.fullScreenMode. [ChangeLog] Added full screen input mode for super wide screens. Change-Id: Ib2650c04767fb0945cc2bedc5b1801d254a15a41 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add new feature "Auto commit word"Jarkko Koivikko2017-01-201-1/+18
| | | | | | | | | | | | | | | This feature, when enabled, automatically commits the remaining single word in the word candidate list, when there was initially multiple candidates. This feature can be enabled from settings using VirtualKeyboardSettings.wordSelectionList.autoCommitWord property. [ChangeLog] Added support for automatic selection of the only remaining word in the suggestion list. Change-Id: Iecfafcaeb3ccb72e1d8e53b92c395b0d1dc84163 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Automatically hide word candidate listJarkko Koivikko2017-01-201-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | This change adds support for automatically hiding word candidate list when inactive. This feature includes the following enhancements: - Added new settings: * VirtualKeyboardSettings.wordCandidateList.autoHideDelay * VirtualKeyboardSettings.wordCandidateList.alwaysVisible - Automatic hiding of word candidate list when inactive and when autoHideDelay elapsed. - alwaysVisible setting restores the old functionality. - Added new signal selectionListsChanged() to input method, allowing the input method to dynamically allocate or deallocate selection lists. - HunspellInputMethod does not allocate selection list when dictionary cannot be loaded, or Qt::ImhNoPredictiveText is enabled. Also, it will no longer use pre-edit text in this case. - OpenWnnInputMethod does not allocate selection list if not needed. [ChangeLog] Automatically hide word candidate list when inactive. Change-Id: Ifa95ae8a7c47a96719ffdc2929601ff2ef9c0d2e Reviewed-by: Gordan Markus <gordan.markus@pelagicore.com> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Implement external keyboard layouts supportGordan Markuš2016-11-161-1/+18
| | | | | | | | | | | | | * Add possibility to override and exclude built-in keyboard layouts * Add QT_VIRTUALKEYBOARD_LAYOUT_PATH environment variable specifying the layout location on the file system or inside a qrc resource * Update documentation accordingly [ChangeLog] Add support for external keyboard layouts, which allows overriding and exclusion of the built-in keyboard layouts Task-number: QTBUG-54254 Change-Id: I960b942c031221d29dbdf1cabed78be8d32f43ef Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* License updateKalle Viironen2016-01-121-9/+17
| | | | | | Change-Id: I0dc6af72a3ae52a0b97b704df84fb1a8197aeeb8 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com>
* Wrap C++ API into namespaceJarkko Koivikko2015-10-271-0/+9
| | | | | | | | | | | | | | | This change wraps the entire C++ API into namespace. In practice, all the C++ interfaces inside the qtvirtualkeyboard plugin are private, except the QPlatformInputContext plugin API. Even the AbstractInputMethod and AbstractInputPanel are not really a public in the sense that they could be used outside the plugin. At least it does not make sense, since there is no way to extend the virtual keyboard functionality without recompiling the plugin. Task-number: QTRD-3628 Change-Id: I1037ee247abca3219efeaa4e4150baaff7c3d668 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* License Headers UpdateKalle Viironen2015-10-261-9/+12
| | | | | Change-Id: Iba2bd21b95dde1aac5750ac77856716e0c61e577 Reviewed-by: Kalle Viironen <kalle.viironen@theqtcompany.com>
* Add a new API to change the keyboard languageJarkko Koivikko2015-10-071-1/+53
| | | | | | | | | | | | | This change adds three new properties for VirtualKeyboardSettings. - locale: Defines the default locale, can also be used to change the current language. - availableLocales: A list of built-in locales. - activeLocales: Application defined list of active locales. Task-number: QTRD-3332 Change-Id: Ia9e69f54501ec7ad7680a6167546b52d0972e2dc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Correct license headers.Mitch Curtis2015-09-151-10/+10
| | | | | | | | | | Using the commercial template found here: https://wiki.it.local/display/QTCOM/Header+templates+to+be+used+in+Qt+Code Change-Id: If401d8fa3ff4dab6ea1e74477d5c02b5dcd09eea Task-number: QTRD-3693 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Change copyright noticeRainer Keller2014-10-061-2/+2
| | | | | | | | | - URL points to qt.io - Update year to 2014 Change-Id: I6a77715faf32c88fe2832a6d21a912a20e5dae50 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Kalle Viironen <kalle.viironen@digia.com>
* Add support for custom styles and runtime change of styleJarkko Koivikko2014-08-191-0/+76
Styles can now co-exist in plugin resources and file system. All the built-in styles are now embedded into plugin resources and therefore available at runtime. Furthermore, custom styles can be installed independently to the target system by copying them into Styles directory: $$[QT_INSTALL_QML]/QtQuick/Enterprise/VirtualKeyboard/Styles The default built-in style is still configured at build time and changed with CONFIG+=retro-style as before. The runtime style can be changed by setting an environment variable QT_VIRTUALKEYBOARD_STYLE to the name of the style. The style name can be one of the built-in styles or custom styles currently available in the system. However, there is an limitation that the custom style cannot have the same name as any of the built-in styles. Added new child module QtQuick.Enterprise.VirtualKeyboard.Settings, which provides VirtualKeyboardSettings instance. Change-Id: Ide076529c2c6d6944d8c0532d0b5daa5a56cae76 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>