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.
|
||||
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
|
||||
# Cthulhu.
|
||||
QUIT_CTHULHU = _("Quit the screen reader")
|
||||
|
@ -57,7 +57,7 @@ keymap = (
|
||||
("BackSpace", defaultModifierMask, CTHULHU_MODIFIER_MASK,
|
||||
"bypassNextCommandHandler"),
|
||||
|
||||
("q", defaultModifierMask, CTHULHU_CTRL_ALT_MODIFIER_MASK | SHIFT_ALT_MODIFIER_MASK,
|
||||
("q", defaultModifierMask, CTHULHU_CTRL_ALT_MODIFIER_MASK | CTHULHU_SHIFT_MODIFIER_MASK,
|
||||
"toggleSleepModeHandler"),
|
||||
|
||||
("q", defaultModifierMask, CTHULHU_MODIFIER_MASK,
|
||||
|
@ -204,6 +204,11 @@ class Script(script.Script):
|
||||
Script.processBrailleCutLine,
|
||||
cmdnames.PROCESS_BRAILLE_CUT_LINE)
|
||||
|
||||
self.inputEventHandlers["toggleSleepModeHandler"] = \
|
||||
input_event.InputEventHandler(
|
||||
Script.toggleSleepMode,
|
||||
cmdnames.TOGGLE_SLEEP_MODE)
|
||||
|
||||
self.inputEventHandlers["shutdownHandler"] = \
|
||||
input_event.InputEventHandler(
|
||||
cthulhu.quitCthulhu,
|
||||
|
Loading…
Reference in New Issue
Block a user