diff --git a/imports/NeoChat/Page/RoomListPage.qml b/imports/NeoChat/Page/RoomListPage.qml index d3a59a57b..e18e3556a 100644 --- a/imports/NeoChat/Page/RoomListPage.qml +++ b/imports/NeoChat/Page/RoomListPage.qml @@ -33,6 +33,7 @@ Kirigami.ScrollablePage { Layout.fillHeight: true Layout.fillWidth: true onTextChanged: sortFilterRoomListModel.filterText = text + KeyNavigation.tab: listView } ListView { @@ -79,9 +80,19 @@ Kirigami.ScrollablePage { } delegate: Kirigami.AbstractListItem { + id: roomListItem visible: model.categoryVisible topPadding: Kirigami.Units.largeSpacing bottomPadding: Kirigami.Units.largeSpacing + focus: true + action: Kirigami.Action { + id: enterRoomAction + onTriggered: { + var roomItem = roomManager.enterRoom(currentRoom) + roomListItem.KeyNavigation.right = roomItem + roomItem.focus = true; + } + } contentItem: Item { implicitHeight: roomLayout.implicitHeight @@ -127,6 +138,7 @@ Kirigami.ScrollablePage { } } } + MouseArea { acceptedButtons: Qt.LeftButton | Qt.RightButton anchors.fill: parent diff --git a/qml/main.qml b/qml/main.qml index d191f939a..6f792a5d1 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -39,8 +39,9 @@ Kirigami.ApplicationWindow { currentRoom = null; pageStack.removePage(pageStack.lastItem); } - pageStack.push(roomPage, { 'currentRoom': room, }); + var item = pageStack.push(roomPage, { 'currentRoom': room, }); currentRoom = room; + return item; } }