diff options
author | Caian Benedicto <caianbene@gmail.com> | 2021-02-10 21:28:44 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-11 01:28:44 +0100 |
commit | f16d7f91f1e0483a55c23382171bb81a679e4d8c (patch) | |
tree | b3c05d649c3cb2451a958931d26c4748a77dc1fa /Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineKeyboardResponse.cs | |
parent | e28a924501b7b94c8b5f42af5b5d44b47e6b82df (diff) |
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
Diffstat (limited to 'Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineKeyboardResponse.cs')
-rw-r--r-- | Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineKeyboardResponse.cs | 101 |
1 files changed, 84 insertions, 17 deletions
diff --git a/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineKeyboardResponse.cs b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineKeyboardResponse.cs index 61908b7b..b21db507 100644 --- a/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineKeyboardResponse.cs +++ b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineKeyboardResponse.cs @@ -1,26 +1,93 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard { /// <summary> - /// Possible responses from the keyboard when running in inline mode. + /// Possible responses from the software keyboard when running in inline mode. /// </summary> enum InlineKeyboardResponse : uint { - FinishedInitialize = 0x0, - Default = 0x1, - ChangedString = 0x2, - MovedCursor = 0x3, - MovedTab = 0x4, - DecidedEnter = 0x5, - DecidedCancel = 0x6, - ChangedStringUtf8 = 0x7, - MovedCursorUtf8 = 0x8, - DecidedEnterUtf8 = 0x9, - UnsetCustomizeDic = 0xA, - ReleasedUserWordInfo = 0xB, + /// <summary> + /// The software keyboard received a Calc and it is fully initialized. Reply data is ignored by the user-process. + /// </summary> + FinishedInitialize = 0x0, + + /// <summary> + /// Default response. Official sw has no handling for this besides just closing the storage. + /// </summary> + Default = 0x1, + + /// <summary> + /// The text data in the software keyboard changed (UTF-16 encoding). + /// </summary> + ChangedString = 0x2, + + /// <summary> + /// The cursor position in the software keyboard changed (UTF-16 encoding). + /// </summary> + MovedCursor = 0x3, + + /// <summary> + /// A tab in the software keyboard changed. + /// </summary> + MovedTab = 0x4, + + /// <summary> + /// The OK key was pressed in the software keyboard, confirming the input text (UTF-16 encoding). + /// </summary> + DecidedEnter = 0x5, + + /// <summary> + /// The Cancel key was pressed in the software keyboard, cancelling the input. + /// </summary> + DecidedCancel = 0x6, + + /// <summary> + /// Same as ChangedString, but with UTF-8 encoding. + /// </summary> + ChangedStringUtf8 = 0x7, + + /// <summary> + /// Same as MovedCursor, but with UTF-8 encoding. + /// </summary> + MovedCursorUtf8 = 0x8, + + /// <summary> + /// Same as DecidedEnter, but with UTF-8 encoding. + /// </summary> + DecidedEnterUtf8 = 0x9, + + /// <summary> + /// They software keyboard is releasing the data previously set by a SetCustomizeDic request. + /// </summary> + UnsetCustomizeDic = 0xA, + + /// <summary> + /// They software keyboard is releasing the data previously set by a SetUserWordInfo request. + /// </summary> + ReleasedUserWordInfo = 0xB, + + /// <summary> + /// They software keyboard is releasing the data previously set by a SetCustomizedDictionaries request. + /// </summary> UnsetCustomizedDictionaries = 0xC, - ChangedStringV2 = 0xD, - MovedCursorV2 = 0xE, - ChangedStringUtf8V2 = 0xF, - MovedCursorUtf8V2 = 0x10 + + /// <summary> + /// Same as ChangedString, but with additional fields. + /// </summary> + ChangedStringV2 = 0xD, + + /// <summary> + /// Same as MovedCursor, but with additional fields. + /// </summary> + MovedCursorV2 = 0xE, + + /// <summary> + /// Same as ChangedStringUtf8, but with additional fields. + /// </summary> + ChangedStringUtf8V2 = 0xF, + + /// <summary> + /// Same as MovedCursorUtf8, but with additional fields. + /// </summary> + MovedCursorUtf8V2 = 0x10 } } |