on xenial help sign in
Handle tab presses
6be84faJosh Arenson
qml/Greeter/LoginList.qml+8−1
@@ -102,6 +102,7 @@ StyledItem {
102 name: "Ubuntu.Components.Themes.Ambiance"
102 name: "Ubuntu.Components.Themes.Ambiance"
103 }
103 }
104
104
105+ KeyNavigation.tab: sessionChooser
105 Keys.onUpPressed: {
106 Keys.onUpPressed: {
106 selected(currentIndex - 1);
107 selected(currentIndex - 1);
107 event.accepted = true;
108 event.accepted = true;
@@ -255,10 +256,16 @@ StyledItem {
255 id: badge
256 id: badge
256 anchors.fill: parent
257 anchors.fill: parent
257 keyColor: "#ffffff" // icon providers give us white icons
258 keyColor: "#ffffff" // icon providers give us white icons
258− color: theme.palette.normal.raisedSecondaryText
259+ color: parent.activeFocus ? theme.palette.normal.selection : theme.palette.normal.raisedSecondaryText
259 source: LightDMService.sessions.iconUrl(root.currentSession)
260 source: LightDMService.sessions.iconUrl(root.currentSession)
260 }
261 }
261
262
263+ KeyNavigation.tab: passwordInput
264+ Keys.onReturnPressed: {
265+ sessionChooserButtonClicked();
266+ event.accepted = true;
267+ }
268+
262 onClicked: {
269 onClicked: {
263 sessionChooserButtonClicked();
270 sessionChooserButtonClicked();
264 }
271 }
qml/Greeter/WideView.qml+1−1
@@ -152,7 +152,7 @@ FocusScope {
152
152
153 active: false
153 active: false
154
154
155− onLoaded: sessionChooserLoader.item.focus = true;
155+ onLoaded: sessionChooserLoader.item.forceActiveFocus();
156 Binding {
156 Binding {
157 target: sessionChooserLoader.item
157 target: sessionChooserLoader.item
158 property: "initiallySelectedSession"
158 property: "initiallySelectedSession"