Try to fix sleep mode so it is actually detected.
This commit is contained in:
parent
1c9ca14272
commit
ba735c554b
@ -460,6 +460,9 @@ TOGGLE_SPEECH = _("Toggle the silencing of speech")
|
|||||||
# This string describes that command.
|
# This string describes that command.
|
||||||
TOGGLE_SPEECH_VERBOSITY = _("Toggle speech verbosity level")
|
TOGGLE_SPEECH_VERBOSITY = _("Toggle speech verbosity level")
|
||||||
|
|
||||||
|
# Translators: this string is associated with the keyboard shortcut to toggle sleepmode
|
||||||
|
TOGGLE_SLEEP_MODE = _("Toggle sleep mode")
|
||||||
|
|
||||||
# Translators: this string is associated with the keyboard shortcut to quit
|
# Translators: this string is associated with the keyboard shortcut to quit
|
||||||
# Cthulhu.
|
# Cthulhu.
|
||||||
QUIT_CTHULHU = _("Quit the screen reader")
|
QUIT_CTHULHU = _("Quit the screen reader")
|
||||||
|
@ -57,7 +57,7 @@ keymap = (
|
|||||||
("BackSpace", defaultModifierMask, CTHULHU_MODIFIER_MASK,
|
("BackSpace", defaultModifierMask, CTHULHU_MODIFIER_MASK,
|
||||||
"bypassNextCommandHandler"),
|
"bypassNextCommandHandler"),
|
||||||
|
|
||||||
("q", defaultModifierMask, CTHULHU_CTRL_ALT_MODIFIER_MASK | SHIFT_ALT_MODIFIER_MASK,
|
("q", defaultModifierMask, CTHULHU_CTRL_ALT_MODIFIER_MASK | CTHULHU_SHIFT_MODIFIER_MASK,
|
||||||
"toggleSleepModeHandler"),
|
"toggleSleepModeHandler"),
|
||||||
|
|
||||||
("q", defaultModifierMask, CTHULHU_MODIFIER_MASK,
|
("q", defaultModifierMask, CTHULHU_MODIFIER_MASK,
|
||||||
|
@ -204,6 +204,11 @@ class Script(script.Script):
|
|||||||
Script.processBrailleCutLine,
|
Script.processBrailleCutLine,
|
||||||
cmdnames.PROCESS_BRAILLE_CUT_LINE)
|
cmdnames.PROCESS_BRAILLE_CUT_LINE)
|
||||||
|
|
||||||
|
self.inputEventHandlers["toggleSleepModeHandler"] = \
|
||||||
|
input_event.InputEventHandler(
|
||||||
|
Script.toggleSleepMode,
|
||||||
|
cmdnames.TOGGLE_SLEEP_MODE)
|
||||||
|
|
||||||
self.inputEventHandlers["shutdownHandler"] = \
|
self.inputEventHandlers["shutdownHandler"] = \
|
||||||
input_event.InputEventHandler(
|
input_event.InputEventHandler(
|
||||||
cthulhu.quitCthulhu,
|
cthulhu.quitCthulhu,
|
||||||
|
Loading…
Reference in New Issue
Block a user