diff --git a/TODO.md b/TODO.md index 8bb84529..676d5b69 100644 --- a/TODO.md +++ b/TODO.md @@ -11,7 +11,10 @@ - When qml syntax highlighting supports ES6 string interpolation, use them - Fixes + - alt+n - Icons on KDE + - Backspace bug + - Add missing shortcuts to config file - Show error if uploading avatar fails or file is corrupted @@ -25,6 +28,8 @@ - Terrible performance using `QT_QPA_PLATFORM=wayland-egl`, must use `xcb` - UI + - Just use Shortcut onHeld instead of analyzing the current velocity + in `smartVerticalFlick()` - Reduce icons brightness - Thinner expand arrow - Restore previous focus after closing right click context menu diff --git a/src/python/config_files.py b/src/python/config_files.py index de256801..bbe82f54 100644 --- a/src/python/config_files.py +++ b/src/python/config_files.py @@ -111,8 +111,10 @@ class UISettings(JSONConfigFile): "startDebugger": ["Alt+Shift+D"], "reloadConfig": "Alt+Shift+R", - "scrollUp": ["Alt+Up", "Alt+K"], - "scrollDown": ["Alt+Down", "Alt+J"], + "scrollUp": ["Alt+Up", "Alt+K"], + "scrollDown": ["Alt+Down", "Alt+J"], + "scrollPageUp": ["Alt+Ctrl+Up", "Alt+Ctrl+K", "PageUp"], + "scrollPageDown": ["Alt+Ctrl+Down", "Alt+Ctrl+J", "PageDown"], "focusSidePane": ["Alt+S", "Ctrl+S"], "clearRoomFilter": ["Alt+Shift+S", "Ctrl+Shift+S"], diff --git a/src/qml/Shortcuts.qml b/src/qml/Shortcuts.qml index 5723b1ff..08e6cc7d 100644 --- a/src/qml/Shortcuts.qml +++ b/src/qml/Shortcuts.qml @@ -32,6 +32,23 @@ HShortcutHandler { onHeld: pressed(event) } + HShortcut { + sequences: settings.keys.scrollPageUp + onPressed: Utils.smartVerticalFlick( + flickTarget, -2.3 * flickTarget.height, 10, + ) + onHeld: pressed(event) + } + + HShortcut { + sequences: settings.keys.scrollPageDown + onPressed: Utils.smartVerticalFlick( + flickTarget, 2.3 * flickTarget.height, 10, + ) + onHeld: pressed(event) + } + + // SidePane HShortcut {