Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/0238 Keyboard Enhancements #10

Open
wants to merge 22 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4687748
Update Structs, Enums;
KhrystynaDubovyk Dec 4, 2020
3c734d7
Upd OnSystemCapabilityUpdated with max number of customizable charact…
KhrystynaDubovyk Dec 16, 2020
09c6fad
Upd SetGlobalProperties - remove p.5,6; add QWERTZ
KhrystynaDubovyk Dec 16, 2020
4b431d5
Upd OnkeyboardInput diagram after the review comments
KhrystynaDubovyk Dec 17, 2020
856c2dd
Upd SetGlobalProperties diagram per review comment
KhrystynaDubovyk Dec 17, 2020
799bb6d
add SetGlobalPropertiesResumptionKeyboardProperties diagram
KhrystynaDubovyk Dec 17, 2020
66efcf6
upd OnkeyboardInput, SetGlobalProperties diagrams; OnSystemCapability…
KhrystynaDubovyk Dec 18, 2020
6391778
change wording in OnSystemCapabilityUpdated note
KhrystynaDubovyk Dec 18, 2020
30e6913
upd diagrams KeyboardEventInputKeyMask, SetGlobalPropertiesResumption…
KhrystynaDubovyk Jan 5, 2021
bdf9042
update per proposal revision
KhrystynaDubovyk Feb 8, 2021
7bf061d
upd p5 of OnSystemCapabilityUpdated index
KhrystynaDubovyk Feb 9, 2021
b1deb58
remove p.2 from NOTE section
KhrystynaDubovyk Feb 9, 2021
0149963
Merge pull request #13 from LuxoftSDL/feature/sdl_0238_keyboard_enhan…
KhrystynaDubovyk Feb 9, 2021
6bb323b
Merge branch 'develop' into feature/sdl_0238_keyboard_enhancements
KhrystynaDubovyk Feb 9, 2021
6a12ab4
Apply suggestions from code review
KhrystynaDubovyk Feb 10, 2021
282b84d
upd KeyboardEventInputKeyMask.png
KhrystynaDubovyk Feb 10, 2021
9215059
remove examples' values from SetGlobalProperties index
KhrystynaDubovyk Feb 10, 2021
966f454
replace MUST section of SetGlobalProperties index
KhrystynaDubovyk Feb 10, 2021
4258a72
add the deleted link to SetGlobalProperties_TTS_UI_VR diagram
KhrystynaDubovyk Feb 10, 2021
c7734de
Apply suggestions from code review
KhrystynaDubovyk Feb 10, 2021
7956763
upd KeyboardEventInputKeyMask diagram
KhrystynaDubovyk Feb 10, 2021
5d25e16
Merge branch 'develop' into feature/sdl_0238_keyboard_enhancements
KhrystynaDubovyk Feb 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/BasicCommunication/OnSystemCapabilityUpdated/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ Purpose
* `menuName` and `templateTitle` should be included, if they are visible on HMI.
* `mainField1-4`, `statusBar` and `mediaTrack` should not be included if OEM implemented the `WEB_VIEW` template without these text fields.
* `availabletemplates`, `buttonCapabilities` and `imageTypeSupported` should reflect the general capabilities of the window/system.
5. HMI sends `KeyboardCapabilities` and max number of customizable keys within OnSystemCapabilityUpdated notification to SDL.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say HMI may send KeyboardCapabilities within OnSystemCapabilityUpdated notification which may include maskInputCharactersSupported, supportedKeyboardLayouts and configurableKeys parameters.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 66efcf6


!!! NOTE

Template `WEB_VIEW` is only allowed for the WebEngine applications with `AppHMIType`=`WEB_VIEW`.
1. Template `WEB_VIEW` is only allowed for the WebEngine applications with `AppHMIType`=`WEB_VIEW`.

2. In case HMI sends `KeyboardCapabilities` without information about `numConfigurableKeys` within OnSystemCapabilityUpdated notification, SDL would provide `KeyboardCapabilities` to app with `numConfigurableKeys` set to zero.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, I will be better to highlight, that numConfigurableKeys will be set to zero only for supported layouts (if they are provided in KeyboardCapabilities struct).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And one more clarification: if KeyboardCapabilities struct doesn't have any information about supported layouts (supportedKeyboardLayouts param is omitted), corresponding requests will use configurableKeys param as is.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dboltovskyi, @ychernysheva
shall I change wording in p.2 like this

  1. In case HMI sends OnSystemCapabilityUpdated notification with KeyboardCapabilities, supportedKeyboardLayouts and without information about numConfigurableKeys , SDL would provide KeyboardCapabilities to app with numConfigurableKeys set to zero.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Ok for me

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 6391778

!!!

#### Parameters
Expand Down
Binary file modified docs/UI/OnKeyboardInput/assets/KeyboardEventInputKeyMask.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 32 additions & 26 deletions docs/UI/OnKeyboardInput/assets/KeyboardEventInputKeyMask.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,49 @@ participant App
participant SDL
participant HMI

note over App,HMI:<align:center> **//Pre-conditions://**\n**1.** appID application is successfully registered and active on HMI\n**2.** By default keyboard input characters are not masked on the screen\n
note over App:<align:center>PIN authentication\nis required
App->SDL:PerformInteraction (appID, <KEYBOARD>)
SDL->HMI:PerformInteraction (appID, <KEYBOARD>)
note over HMI:<align:center> Displays the keyboard\nin accordance with appID\nSetGlobalProperties presets
HMI->>SDL:UI.Onsystemcontext (<HMI_OBSCURED>)
SDL->>App:Onsystemcontext (<HMI_OBSCURED>)
note over App,HMI:<align:center> **//Pre-conditions://**\n**1.** appID application is successfully registered and active on HMI\n**2.** HMI supports masking input characters

HMI->>SDL: BC.OnSystemCapabilityUpdated(**maskInputCharactersSupported=true**)
SDL->>App: OnSystemCapabilityUpdated(maskInputCharactersSupported=true)
opt App sends the request to mask keyboard input characters
App->SDL:<align:center>SetGlobalProperties(appID,\n **maskInputCharacters=ENABLE_INPUT_KEY_MASK**)
SDL->HMI:<align:center>UI.SetGlobalProperties(appID,\n **maskInputCharacters=ENABLE_INPUT_KEY_MASK**)
note over HMI:<align:center>Stores the request data\nassociating it with appID
HMI-->SDL:UI.SetGlobalProperties (code:0)
SDL-->App:SetGlobalProperties (SUCCESS)
note over HMI:The User presses **"1"** key
HMI->>SDL:UI.OnkeyboardInput ("1", <KEYPRESS>)
SDL->>App:OnkeyboardInput ("1", <KEYPRESS>)
note over HMI:<align:center>Keyboard input characters\nare **not masked**\non the screen
note over HMI:<align:center>User input is shown **masked**
end

opt App sends the request to mask keyboard input characters
App->SDL:SetGlobalProperties (appID, <ENABLE_INPUT_KEY_MASK>)
SDL->HMI:UI.SetGlobalProperties (appID, <ENABLE_INPUT_KEY_MASK>)
opt App sends the request to UNmask keyboard input characters
App->SDL:<align:center>SetGlobalProperties(appID,\n **maskInputCharacters=DISABLE_INPUT_KEY_MASK**
SDL->HMI:<align:center>UI.SetGlobalProperties(appID,\n**maskInputCharacters=DISABLE_INPUT_KEY_MASK**
note over HMI:<align:center>Stores the request data\nassociating it with appID
HMI-->SDL:UI.SetGlobalProperties (code:0)
SDL-->App:SetGlobalProperties (code:0)
SDL-->App:SetGlobalProperties (SUCCESS)
note over HMI:The User presses **"1"** key
dboltovskyi marked this conversation as resolved.
Show resolved Hide resolved
HMI->>SDL:UI.OnkeyboardInput ("1", <INPUT_KEY_MASK_ENABLED>)
SDL->>App:OnkeyboardInput ("1", <INPUT_KEY_MASK_ENABLED>)
note over HMI:<align:center>Keyboard input characters\nare **masked**\non the screen
HMI->>SDL:UI.OnkeyboardInput ("1", <KEYPRESS>)
SDL->>App:OnkeyboardInput ("1", <KEYPRESS>)
note over HMI:<align:center>User input is shown **NOT masked**
end

opt App sends the request to unmask keyboard input characters per User choice
App->SDL:SetGlobalProperties (appID, <USER_CHOICE_INPUT_KEY_MASK>)
SDL->HMI:UI.SetGlobalProperties (appID, <USER_CHOICE_INPUT_KEY_MASK>)
App->SDL:<align:center> SetGlobalProperties (appID,\n **maskInputCharacters=USER_CHOICE_INPUT_KEY_MASK**)
SDL->HMI:<align:center> UI.SetGlobalProperties (appID,\n **maskInputCharacters=USER_CHOICE_INPUT_KEY_MASK**)
note over HMI:<align:center>Stores the request data\nassociating it with appID
HMI-->SDL:UI.SetGlobalProperties (code:0)
SDL-->App:SetGlobalProperties (code:0)
SDL-->App:SetGlobalProperties (SUCCESS)
HMI->>SDL:UI.OnkeyboardInput (<INPUT_KEY_MASK_DISABLED>)
SDL->>App:OnkeyboardInput (<INPUT_KEY_MASK_DISABLED>)
note over HMI:<align:center>A key to mask/unmask\ninput characters is shown
note over HMI:The User presses **"1"** key
HMI->>SDL:UI.OnkeyboardInput ("1", <INPUT_KEY_MASK_ENABLED>)
SDL->>App:OnkeyboardInput ("1", <INPUT_KEY_MASK_ENABLED>)
note over HMI:<align:center>Keyboard input characters\nare **masked**\non the screen
note over HMI:<align:center> **Postcondition**:\nProvides a key to unmask\ninput characters
note over HMI:<align:center>The User presses the key\nto unmask input characters
note over HMI:<align:center>Keyboard input characters\nare **not masked**\non the screen
HMI->>SDL:UI.OnKeyboardInput (<INPUT_KEY_MASK_DISABLED>)
SDL->>App:OnKeyboardInput (<INPUT_KEY_MASK_DISABLED>)
HMI->>SDL:UI.OnkeyboardInput ("1", <KEYPRESS>)
SDL->>App:OnkeyboardInput ("1", <KEYPRESS>)
dboltovskyi marked this conversation as resolved.
Show resolved Hide resolved
note over HMI:The User presses the key\n to mask input characters
HMI->>SDL:UI.OnkeyboardInput (<INPUT_KEY_MASK_ENABLED>)
SDL->>App:OnkeyboardInput (<INPUT_KEY_MASK_ENABLED>)
note over HMI:<align:center>Keyboard input characters\nare ** masked**\non the screen

end
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ note over App,HMI:<align:center> **//Pre-conditions://**\n**1.** appID applicati

opt App sends a request to change customizable keys special characters - Happy Path
note over HMI:<align:center>Keyboard layout\ncustomizable keys are:\n**" # "** - default value\n**" - "** - default value
App->SDL:SetGlobalProperties (appID, <customizeKeys: **" # ", " $ "**>)
SDL->HMI:UI.SetGlobalProperties (appID, <customizeKeys: **" # ", " $ "**>)
App->SDL:SetGlobalProperties (appID, <customizeKeys: **" ¥ ", " $ "**>)
SDL->HMI:UI.SetGlobalProperties (appID, <customizeKeys: **" ¥ ", " $ "**>)
HMI->HMI:Update\ncustomizable\nkeys
HMI-->SDL:UI.SetGlobalProperties (SUCCESS)
SDL-->App:SetGlobalProperties (SUCCESS)
note over HMI:<align:center>Keyboard layout\ncustomizable keys are:\n**" # "** - customized value\n** " $ "** - customized value
note over HMI:<align:center>Keyboard layout\ncustomizable keys are:\n**" ¥ "** - customized value\n** " $ "** - customized value
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This scenario updates already available character '#' (default one)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated in 856c2dd


opt App sends a request with a special character already available on keyboard
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
participant App
participant SDL
participant HMI

note over App,HMI:<align:center>**//Pre-conditions://**\n**1.** appID application is successfuly registered, activated\n**2.** App set non-default values for 'KeyboardProperties' via SetGlobalProperties request\n keyboardLayout=AZERTY; maskInputCharacters=USER_CHOICE_INPUT_KEY_MASK; customizeKeys = "#", "$"

note over App,HMI: Unexpected disconnect and reconnect are performed

App->SDL: RegisterAppInterface(hashID, params)


note over SDL:<align:center> <hashID> is valid\nStart data resumption for the App

SDL->HMI:<align:center>UI.SetGlobalProperties\n (**keyboardLayout=AZERTY;\nmaskInputCharacters=USER_CHOICE_INPUT_KEY_MASK;\ncustomizeKeys = #, $**)

HMI-->SDL: UI.SetGlobalProperties (code:0)


SDL-->App: RegisterAppInterface (SUCCESS)

SDL->>HMI: BC.OnAppRegistered(appName; appID)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This notification is sent before UI.SetGlobalProperties request

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 66efcf6

SDL->>App: OnHMIStatus()

SDL->HMI: BC.ActivateApp()
HMI-->SDL: BC.ActivateApp (code:0)

HMI->>SDL: UI.OnKeyboardInput(INPUT_KEY_MASK_DISABLED)
SDL->>App:OnKeyboardInput(INPUT_KEY_MASK_DISABLED)
10 changes: 7 additions & 3 deletions docs/UI/SetGlobalProperties/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ _**Notes for HMI expected behavior:**_
6. When the User selects one of the displayed matching `autoCompleteList` strings, the system shall submit that entry and not require further User input for submission.
7. HMI allows to customize special characters depending on the keyboard layout restrictions:
* `QWERTY` - 3 customizable keys
* `QWERTZ` - 3 customizable keys
* `AZERTY` - 4 customizable keys
* `NUMERIC` - 2 customizable keys

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please notice there 4 layouts available, QWERTZ currently is missing

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and how many customizable buttons allowed for QWERTZ ? three?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added in 09c6fad


Expand Down Expand Up @@ -75,9 +76,7 @@ _**Important Note:**_ If HMI-defined VR commands are accessible together with th
* display the complete list of available VR commands (SDL-defined and HMI-defined ones) when the User activates VR.

4. HMI displays the in-application menu for every active application upon the User's request. It must contain SDL-requested commands (UI.AddCommand) and sub-menus (UI.AddSubMenu). SDL provides the values for the name (`menuTitle` parameter) and for the icon (`menuIcon` parameter) of this in-application menu. The values for in-application menu and touchscreen keyboard are allowed by SDL Core for navigation type of application only.
5. HMI must display the onscreen keyboard upon the User's request within the following condition: all `keyboardProperties` supported by HMI must be embodied in `HMI_capabilities.json file`. In this case SDL Core is able to compare `keyboardProperties` requested by the mobile device with actually supported `keyboardProperties` and send to HMI only those that are supported.
6. HMI must use default `keyboardProperties` parameters, in case SDL Core transfers UI.SetGlobalProperties request with omitted or empty `keyboardProperties` parameters.
7. In case SDL sends request with some values in `customizeKeys` array, HMI must:
5. In case SDL sends request with some values in `customizeKeys` array, HMI must:
* use these values to change the special characters shown in customizable keys
* keep default values in the remaining keys, if the array is less than or equal to customizable keys amount

Expand Down Expand Up @@ -107,6 +106,11 @@ SetGlobalProperties Customize Keys
![SetGlobalProperties](./assets/SetGlobalPropertiesCustomizeKeys.png)
|||

|||
SetGlobalProperties Resumption of non-default KeyboardProperties
![SetGlobalProperties](./assets/SetGlobalPropertiesResumptionKeyboardProperties.png)
|||

### JSON Message Examples

#### Example Request
Expand Down