respect device setting for keyboard values are AUTO, ALL, and a device name
This commit is contained in:
parent
dc6a635e1f
commit
ee24881169
@ -58,7 +58,7 @@ voice=
|
|||||||
language=english-us
|
language=english-us
|
||||||
|
|
||||||
# Read new text as it happens?
|
# Read new text as it happens?
|
||||||
autoReadIncomming=True
|
autoReadIncoming=True
|
||||||
|
|
||||||
[braille]
|
[braille]
|
||||||
#braille is not implemented yet
|
#braille is not implemented yet
|
||||||
@ -70,22 +70,23 @@ driver=linux
|
|||||||
encoding=cp850
|
encoding=cp850
|
||||||
screenUpdateDelay=0.4
|
screenUpdateDelay=0.4
|
||||||
suspendingScreen=
|
suspendingScreen=
|
||||||
autodetectSuspendingScreen=False
|
autodetectSuspendingScreen=True
|
||||||
|
|
||||||
[keyboard]
|
[keyboard]
|
||||||
driver=evdev
|
driver=evdev
|
||||||
device=all
|
# filter input devices AUTO, ALL or a DEVICE NAME
|
||||||
|
device=AUTO
|
||||||
# gives fenrir exclusive access to the keyboard and let consume keystrokes. just disable on problems.
|
# gives fenrir exclusive access to the keyboard and let consume keystrokes. just disable on problems.
|
||||||
grabDevices=True
|
grabDevices=True
|
||||||
ignoreShortcuts=False
|
ignoreShortcuts=False
|
||||||
# the current shortcut layout located in /etc/fenrir/keyboard
|
# the current shortcut layout located in /etc/fenrir/keyboard
|
||||||
keyboardLayout=test
|
keyboardLayout=desktop
|
||||||
# echo chars while typing.
|
# echo chars while typing.
|
||||||
charEcho=True
|
charEcho=False
|
||||||
# echo deleted chars
|
# echo deleted chars
|
||||||
charDeleteEcho=True
|
charDeleteEcho=True
|
||||||
# echo word after pressing space
|
# echo word after pressing space
|
||||||
wordEcho=True
|
wordEcho=False
|
||||||
# interrupt speech on any keypress
|
# interrupt speech on any keypress
|
||||||
interruptOnKeyPress=False
|
interruptOnKeyPress=False
|
||||||
# timeout for double tap in sec
|
# timeout for double tap in sec
|
||||||
@ -96,7 +97,7 @@ debugLevel=0
|
|||||||
punctuationLevel=Some
|
punctuationLevel=Some
|
||||||
numberOfClipboards=10
|
numberOfClipboards=10
|
||||||
# define the current fenrir key
|
# define the current fenrir key
|
||||||
fenrirKeys=KEY_KP0
|
fenrirKeys=KEY_KP0,KEY_META
|
||||||
timeFormat=%H:%M:%P
|
timeFormat=%H:%M:%P
|
||||||
dateFormat=%A, %B %d, %Y
|
dateFormat=%A, %B %d, %Y
|
||||||
autoSpellCheck=True
|
autoSpellCheck=True
|
||||||
|
@ -72,7 +72,8 @@ autodetectSuspendingScreen=True
|
|||||||
|
|
||||||
[keyboard]
|
[keyboard]
|
||||||
driver=evdev
|
driver=evdev
|
||||||
device=all
|
# filter input devices AUTO, ALL or a DEVICE NAME
|
||||||
|
device=AUTO
|
||||||
# gives fenrir exclusive access to the keyboard and let consume keystrokes. just disable on problems.
|
# gives fenrir exclusive access to the keyboard and let consume keystrokes. just disable on problems.
|
||||||
grabDevices=True
|
grabDevices=True
|
||||||
ignoreShortcuts=False
|
ignoreShortcuts=False
|
||||||
|
@ -31,7 +31,8 @@ autodetectSuspendingScreen=False
|
|||||||
|
|
||||||
[keyboard]
|
[keyboard]
|
||||||
driver=evdev
|
driver=evdev
|
||||||
device=all
|
# filter input devices AUTO, ALL or a DEVICE NAME
|
||||||
|
device=AUTO
|
||||||
grabDevices=True
|
grabDevices=True
|
||||||
ignoreShortcuts=False
|
ignoreShortcuts=False
|
||||||
keyboardLayout=desktop
|
keyboardLayout=desktop
|
||||||
|
@ -60,11 +60,17 @@ class driver():
|
|||||||
# 1 Keys
|
# 1 Keys
|
||||||
# we try to filter out mices and other stuff here
|
# we try to filter out mices and other stuff here
|
||||||
self.iDevices = map(evdev.InputDevice, (evdev.list_devices()))
|
self.iDevices = map(evdev.InputDevice, (evdev.list_devices()))
|
||||||
self.iDevices = {dev.fd: dev for dev in self.iDevices if 1 in dev.capabilities() and not 3 in dev.capabilities() and not 2 in dev.capabilities()}
|
self.ledDevices = map(evdev.InputDevice, (evdev.list_devices()))
|
||||||
#self.iDevices = {dev.fd: dev for dev in self.iDevices if 1 in dev.capabilities()}
|
if self.env['runtime']['settingsManager'].getSetting('keyboard', 'device').upper() == 'ALL':
|
||||||
self.ledDevices = map(evdev.InputDevice, (evdev.list_devices()))
|
self.iDevices = {dev.fd: dev for dev in self.iDevices if 1 in dev.capabilities()}
|
||||||
self.ledDevices = {dev.fd: dev for dev in self.ledDevices if 1 in dev.capabilities() and 17 in dev.capabilities() and not 3 in dev.capabilities() and not 2 in dev.capabilities()}
|
self.ledDevices = {dev.fd: dev for dev in self.ledDevices if 1 in dev.capabilities() and 17 in dev.capabilities()}
|
||||||
|
elif self.env['runtime']['settingsManager'].getSetting('keyboard', 'device').upper() == 'AUTO':
|
||||||
|
self.iDevices = {dev.fd: dev for dev in self.iDevices if 1 in dev.capabilities() and not 3 in dev.capabilities() and not 2 in dev.capabilities()}
|
||||||
|
self.ledDevices = {dev.fd: dev for dev in self.ledDevices if 1 in dev.capabilities() and 17 in dev.capabilities() and not 3 in dev.capabilities() and not 2 in dev.capabilities()}
|
||||||
|
else:
|
||||||
|
self.iDevices = {dev.fd: dev for dev in self.iDevices if dev.name.upper() in self.env['runtime']['settingsManager'].getSetting('keyboard', 'device').upper()}
|
||||||
|
self.ledDevices = {dev.fd: dev for dev in self.ledDevices if dev.name.upper() in self.env['runtime']['settingsManager'].getSetting('keyboard', 'device').upper()}
|
||||||
|
|
||||||
def mapEvent(self, event):
|
def mapEvent(self, event):
|
||||||
if not event:
|
if not event:
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user