Fix brightness keybinding
This commit is contained in:
parent
a4e1b6b3ff
commit
41ba004ca3
4
README
4
README
@ -22,10 +22,6 @@ F1 Mesh zoom level
|
|||||||
F2 Friends zoom level
|
F2 Friends zoom level
|
||||||
F3 Home zoom level
|
F3 Home zoom level
|
||||||
F4 Activity zoom level
|
F4 Activity zoom level
|
||||||
F5 Decrease brightness (DCON)
|
|
||||||
F6 Increase brightness (DCON)
|
|
||||||
F7 Color mode (DCON)
|
|
||||||
F8 Black and white mode (DCON)
|
|
||||||
|
|
||||||
Shift+Alt+F9 Show the frame
|
Shift+Alt+F9 Show the frame
|
||||||
Shift+Alt+F10 Toggle chat visibility
|
Shift+Alt+F10 Toggle chat visibility
|
||||||
|
@ -103,12 +103,22 @@ class Shell(gobject.GObject):
|
|||||||
elif key == 'F4':
|
elif key == 'F4':
|
||||||
self.set_zoom_level(sugar.ZOOM_ACTIVITY)
|
self.set_zoom_level(sugar.ZOOM_ACTIVITY)
|
||||||
elif key == 'F5':
|
elif key == 'F5':
|
||||||
self._dcon_manager.decrease_brightness()
|
self._dcon_manager.set_brightness(0)
|
||||||
|
elif key == 'F16':
|
||||||
|
self._dcon_manager.set_brightness(3)
|
||||||
elif key == 'F6':
|
elif key == 'F6':
|
||||||
self._dcon_manager.increase_brightness()
|
self._dcon_manager.set_brightness(5)
|
||||||
|
elif key == 'F17':
|
||||||
|
self._dcon_manager.set_brightness(7)
|
||||||
elif key == 'F7':
|
elif key == 'F7':
|
||||||
self._dcon_manager.set_mode(DCONManager.COLOR_MODE)
|
self._dcon_manager.set_brightness(9)
|
||||||
|
elif key == 'F18':
|
||||||
|
self._dcon_manager.set_brightness(12)
|
||||||
elif key == 'F8':
|
elif key == 'F8':
|
||||||
|
self._dcon_manager.set_brightness(15)
|
||||||
|
elif key == '<alt>F5':
|
||||||
|
self._dcon_manager.set_mode(DCONManager.COLOR_MODE)
|
||||||
|
elif key == '<alt>F8':
|
||||||
self._dcon_manager.set_mode(DCONManager.BLACK_AND_WHITE_MODE)
|
self._dcon_manager.set_mode(DCONManager.BLACK_AND_WHITE_MODE)
|
||||||
elif key == '<shft><alt>F9':
|
elif key == '<shft><alt>F9':
|
||||||
self._frame.notify_key_press()
|
self._frame.notify_key_press()
|
||||||
|
@ -32,12 +32,5 @@ class DCONManager(object):
|
|||||||
def set_mode(self, mode):
|
def set_mode(self, mode):
|
||||||
self._service.set_mode(mode)
|
self._service.set_mode(mode)
|
||||||
|
|
||||||
def increase_brightness(self):
|
def set_brightness(self, level):
|
||||||
level = self._service.get_backlight_level()
|
self._service.set_backlight_level(level)
|
||||||
if level >= 0:
|
|
||||||
self._service.set_backlight_level(level + 1)
|
|
||||||
|
|
||||||
def decrease_brightness(self):
|
|
||||||
level = self._service.get_backlight_level()
|
|
||||||
if level >= 0:
|
|
||||||
self._service.set_backlight_level(level - 1)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user