Open the app with the Predator key, bump to 1.3.0

The Predator key sends keyboard usage 0xC9, which lies outside the
logical range the keyboard declares, so the kernel never emits an input
event for it. It is also reported on vendor report 4 of USB interface 2
(04 81 ff on press). predatord now listens there and opens the app in
the active graphical session via the user's systemd manager.

The action is configurable on the System page: open the app, switch to
the next performance mode, or do nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
MrBlakeandClaude Opus 5.5 committed 2026-10-07 17:51:21 +02:00
1 parent cc4fdb9cd0
commit 5b7534560f
11 files changed
+142 -8

No files matched your search

+15
View File
@@ -674,6 +674,19 @@ class SystemPage(Page):
self.fw_card.body.addWidget(_muted("Values are stored in the laptop firmware (EC/BIOS)."))
self.lay.addWidget(self.fw_card)
key = Card("Predator key")
kr = QHBoxLayout()
kr.addWidget(QLabel("When the Predator key is pressed"))
self.key_action = QComboBox()
for val, text in (("open", "Open Predator Control"), ("cycle_profile", "Switch to the next performance mode"),
("none", "Do nothing")):
self.key_action.addItem(text, val)
self.key_action.activated.connect(lambda: win.backend.run("set_predator_key", action=self.key_action.currentData()))
kr.addWidget(self.key_action)
kr.addStretch(1)
key.body.addLayout(kr)
self.lay.addWidget(key)
upd = Card("Updates")
self.upd_head = QLabel("")
self.upd_head.setObjectName("big")
@@ -782,6 +795,8 @@ class SystemPage(Page):
err = ("\n\n⚠ %s" % st["update_error"]) if st.get("update_error") else ""
self.upd_text.setText("Installed version %s · last check %s%s%s" % (st.get("version"), when, err, extra))
self.upd_install.hide()
if not self.key_action.view().isVisible():
self.key_action.setCurrentIndex(max(0, self.key_action.findData(st["config"].get("predator_key", "open"))))
self.upd_auto.setChecked(st["config"].get("updates", {}).get("auto_check", True))
a = st["available"]
yes = lambda v: "✔" if v else "✘"