Add keybinds to config file
This commit is contained in:
parent
2be23128b1
commit
efa4ad0ae0
1
TODO.md
1
TODO.md
|
@ -98,6 +98,7 @@
|
||||||
- Links preview
|
- Links preview
|
||||||
|
|
||||||
- Client improvements
|
- Client improvements
|
||||||
|
- Config file format
|
||||||
- Set Qt.application.* stuff from C++
|
- Set Qt.application.* stuff from C++
|
||||||
- [debug mode](https://docs.python.org/3/library/asyncio-dev.html)
|
- [debug mode](https://docs.python.org/3/library/asyncio-dev.html)
|
||||||
- Initial sync filter and lazy load, see weechat-matrix `_handle_login()`
|
- Initial sync filter and lazy load, see weechat-matrix `_handle_login()`
|
||||||
|
|
|
@ -104,6 +104,11 @@ class UISettings(JSONConfigFile):
|
||||||
return {
|
return {
|
||||||
"theme": "Default.qpl",
|
"theme": "Default.qpl",
|
||||||
"writeAliases": {},
|
"writeAliases": {},
|
||||||
|
"keys": {
|
||||||
|
"scrollUp": ["Alt+Up", "Alt+K"],
|
||||||
|
"scrollDown": ["Alt+Down", "Alt+J"],
|
||||||
|
"startDebugger": ["Alt+Shift+D"],
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -76,12 +76,12 @@ HRectangle {
|
||||||
// Declaring this as "alias" provides the on... signal
|
// Declaring this as "alias" provides the on... signal
|
||||||
property real yPos: visibleArea.yPosition
|
property real yPos: visibleArea.yPosition
|
||||||
property bool canLoad: true
|
property bool canLoad: true
|
||||||
property int zz: 0
|
// property int zz: 0
|
||||||
|
|
||||||
onYPosChanged: {
|
onYPosChanged: {
|
||||||
if (chatPage.category != "Invites" && canLoad && yPos <= 0.1) {
|
if (chatPage.category != "Invites" && canLoad && yPos <= 0.1) {
|
||||||
zz += 1
|
// zz += 1
|
||||||
print(canLoad, zz)
|
// print(canLoad, zz)
|
||||||
eventList.canLoad = false
|
eventList.canLoad = false
|
||||||
py.callClientCoro(
|
py.callClientCoro(
|
||||||
chatPage.userId, "load_past_events", [chatPage.roomId],
|
chatPage.userId, "load_past_events", [chatPage.roomId],
|
||||||
|
|
|
@ -18,17 +18,17 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequences: ["Alt+Up", "Alt+K"]
|
sequences: settings.keys ? settings.keys.scrollUp : []
|
||||||
onActivated: smartVerticalFlick(-335)
|
onActivated: smartVerticalFlick(-335)
|
||||||
}
|
}
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequences: ["Alt+Down", "Alt+J"]
|
sequences: settings.keys ? settings.keys.scrollDown : []
|
||||||
onActivated: smartVerticalFlick(335)
|
onActivated: smartVerticalFlick(335)
|
||||||
}
|
}
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequence: "Alt+Shift+D"
|
sequence: settings.keys ? settings.keys.startDebugger : []
|
||||||
onActivated: if (window.debug) { py.call("APP.pdb") }
|
onActivated: if (window.debug) { py.call("APP.pdb") }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user