Improve inline keyboard compatibility (#1959)

* Improve compatibility of the inline keyboard with some games

* Send an empty first text to avoid crashing some games

* Implement SetCustomizedDictionaries and fix SetCustomizeDic

* Expand Bg and Fg –abbreviations in the swkbd applet

* Fix variable names and add comments to software keyboard
This commit is contained in:
Caian Benedicto 2021-02-10 21:28:44 -03:00 committed by GitHub
parent e28a924501
commit f16d7f91f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 626 additions and 207 deletions

View file

@ -1,18 +1,48 @@
namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
{
/// <summary>
/// Possible requests to the keyboard when running in inline mode.
/// Possible requests to the software keyboard when running in inline mode.
/// </summary>
enum InlineKeyboardRequest : uint
{
Unknown0 = 0x0,
Finalize = 0x4,
SetUserWordInfo = 0x6,
SetCustomizeDic = 0x7,
Calc = 0xA,
SetCustomizedDictionaries = 0xB,
/// <summary>
/// Finalize the keyboard applet.
/// </summary>
Finalize = 0x4,
/// <summary>
/// Set user words for text prediction.
/// </summary>
SetUserWordInfo = 0x6,
/// <summary>
/// Sets the CustomizeDic data. Can't be used if CustomizedDictionaries is already set.
/// </summary>
SetCustomizeDic = 0x7,
/// <summary>
/// Configure the keyboard applet and put it in a state where it is processing input.
/// </summary>
Calc = 0xA,
/// <summary>
/// Set custom dictionaries for text prediction. Can't be used if SetCustomizeDic is already set.
/// </summary>
SetCustomizedDictionaries = 0xB,
/// <summary>
/// Release custom dictionaries data.
/// </summary>
UnsetCustomizedDictionaries = 0xC,
UseChangedStringV2 = 0xD,
UseMovedCursorV2 = 0xE
/// <summary>
/// [8.0.0+] Request the keyboard applet to use the ChangedStringV2 response when notifying changes in text data.
/// </summary>
UseChangedStringV2 = 0xD,
/// <summary>
/// [8.0.0+] Request the keyboard applet to use the MovedCursorV2 response when notifying changes in cursor position.
/// </summary>
UseMovedCursorV2 = 0xE
}
}