Add keybinds to config file

This commit is contained in:
miruka 2019-07-24 17:05:27 -04:00
parent 2be23128b1
commit efa4ad0ae0
4 changed files with 12 additions and 6 deletions

View File

@ -98,6 +98,7 @@
- Links preview
- Client improvements
- Config file format
- Set Qt.application.* stuff from C++
- [debug mode](https://docs.python.org/3/library/asyncio-dev.html)
- Initial sync filter and lazy load, see weechat-matrix `_handle_login()`

View File

@ -104,6 +104,11 @@ class UISettings(JSONConfigFile):
return {
"theme": "Default.qpl",
"writeAliases": {},
"keys": {
"scrollUp": ["Alt+Up", "Alt+K"],
"scrollDown": ["Alt+Down", "Alt+J"],
"startDebugger": ["Alt+Shift+D"],
},
}

View File

@ -76,12 +76,12 @@ HRectangle {
// Declaring this as "alias" provides the on... signal
property real yPos: visibleArea.yPosition
property bool canLoad: true
property int zz: 0
// property int zz: 0
onYPosChanged: {
if (chatPage.category != "Invites" && canLoad && yPos <= 0.1) {
zz += 1
print(canLoad, zz)
// zz += 1
// print(canLoad, zz)
eventList.canLoad = false
py.callClientCoro(
chatPage.userId, "load_past_events", [chatPage.roomId],

View File

@ -18,17 +18,17 @@ Item {
}
Shortcut {
sequences: ["Alt+Up", "Alt+K"]
sequences: settings.keys ? settings.keys.scrollUp : []
onActivated: smartVerticalFlick(-335)
}
Shortcut {
sequences: ["Alt+Down", "Alt+J"]
sequences: settings.keys ? settings.keys.scrollDown : []
onActivated: smartVerticalFlick(335)
}
Shortcut {
sequence: "Alt+Shift+D"
sequence: settings.keys ? settings.keys.startDebugger : []
onActivated: if (window.debug) { py.call("APP.pdb") }
}