aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/config
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/config')
-rw-r--r--xorg-server/config/10-evdev.conf80
-rw-r--r--xorg-server/config/dbus-api80
-rw-r--r--xorg-server/config/fdi2iclass.py404
-rw-r--r--xorg-server/config/x11-input.fdi186
-rw-r--r--xorg-server/config/xorg-server.conf26
5 files changed, 388 insertions, 388 deletions
diff --git a/xorg-server/config/10-evdev.conf b/xorg-server/config/10-evdev.conf
index 144110846..cc83ab232 100644
--- a/xorg-server/config/10-evdev.conf
+++ b/xorg-server/config/10-evdev.conf
@@ -1,40 +1,40 @@
-#
-# Catch-all evdev loader for udev-based systems
-# We don't simply match on any device since that also adds accelerometers
-# and other devices that we don't really want to use. The list below
-# matches everything but joysticks.
-
-Section "InputClass"
- Identifier "evdev pointer catchall"
- MatchIsPointer "on"
- MatchDevicePath "/dev/input/event*"
- Driver "evdev"
-EndSection
-
-Section "InputClass"
- Identifier "evdev keyboard catchall"
- MatchIsKeyboard "on"
- MatchDevicePath "/dev/input/event*"
- Driver "evdev"
-EndSection
-
-Section "InputClass"
- Identifier "evdev touchpad catchall"
- MatchIsTouchpad "on"
- MatchDevicePath "/dev/input/event*"
- Driver "evdev"
-EndSection
-
-Section "InputClass"
- Identifier "evdev tablet catchall"
- MatchIsTablet "on"
- MatchDevicePath "/dev/input/event*"
- Driver "evdev"
-EndSection
-
-Section "InputClass"
- Identifier "evdev touchscreen catchall"
- MatchIsTouchscreen "on"
- MatchDevicePath "/dev/input/event*"
- Driver "evdev"
-EndSection
+#
+# Catch-all evdev loader for udev-based systems
+# We don't simply match on any device since that also adds accelerometers
+# and other devices that we don't really want to use. The list below
+# matches everything but joysticks.
+
+Section "InputClass"
+ Identifier "evdev pointer catchall"
+ MatchIsPointer "on"
+ MatchDevicePath "/dev/input/event*"
+ Driver "evdev"
+EndSection
+
+Section "InputClass"
+ Identifier "evdev keyboard catchall"
+ MatchIsKeyboard "on"
+ MatchDevicePath "/dev/input/event*"
+ Driver "evdev"
+EndSection
+
+Section "InputClass"
+ Identifier "evdev touchpad catchall"
+ MatchIsTouchpad "on"
+ MatchDevicePath "/dev/input/event*"
+ Driver "evdev"
+EndSection
+
+Section "InputClass"
+ Identifier "evdev tablet catchall"
+ MatchIsTablet "on"
+ MatchDevicePath "/dev/input/event*"
+ Driver "evdev"
+EndSection
+
+Section "InputClass"
+ Identifier "evdev touchscreen catchall"
+ MatchIsTouchscreen "on"
+ MatchDevicePath "/dev/input/event*"
+ Driver "evdev"
+EndSection
diff --git a/xorg-server/config/dbus-api b/xorg-server/config/dbus-api
index 3c5ea32a6..018e98657 100644
--- a/xorg-server/config/dbus-api
+++ b/xorg-server/config/dbus-api
@@ -1,40 +1,40 @@
-D-BUS Configuration API v2
-----------------------------
-
-The X server will register the bus name org.x.config.displayN, and the
-object /org/x/config/N, where N is the display number.
-
-Currently only hotplugging of input devices is supported.
-
-org.x.config.input:
- org.x.config.input.version:
- Returns one unsigned int32, which is the API version.
-
- org.x.config.input.add:
- Takes an argument of key/value option pairs in arrays, e.g.:
- [ss][ss][ss][ss]
- is the signature for four options. These options will be passed
- to the input driver as with any others.
- Option names beginning with _ are not allowed; they are reserved
- for internal use.
-
- Returns a number of signed int32s. Positive integers are the
- device IDs of new devices; negative numbers are X error codes,
- as defined in X.h. BadMatch will be returned if the options
- given do not match any device. BadValue is returned for a malformed
- message. (Example: 8 is new device ID 8; -8 is BadMatch.)
-
- Notably, BadAlloc is never returned: the server internally signals
- to D-BUS that the attempt failed for lack of memory.
-
- org.x.config.input.remove:
- Takes one uint32 argument, which is the device ID to remove, i.e.:
- u
- is the signature.
-
- Returns one signed int32 which represents an X status as defined in
- X.h. See org.x.config.input.add. Error codes are negative numbers.
-
- org.x.config.input.listDevices:
- Lists the currently active devices. No argument.
- Return value is sequence of [<id> <name>] [<id> <name>] ..., i.e. [us].
+D-BUS Configuration API v2
+----------------------------
+
+The X server will register the bus name org.x.config.displayN, and the
+object /org/x/config/N, where N is the display number.
+
+Currently only hotplugging of input devices is supported.
+
+org.x.config.input:
+ org.x.config.input.version:
+ Returns one unsigned int32, which is the API version.
+
+ org.x.config.input.add:
+ Takes an argument of key/value option pairs in arrays, e.g.:
+ [ss][ss][ss][ss]
+ is the signature for four options. These options will be passed
+ to the input driver as with any others.
+ Option names beginning with _ are not allowed; they are reserved
+ for internal use.
+
+ Returns a number of signed int32s. Positive integers are the
+ device IDs of new devices; negative numbers are X error codes,
+ as defined in X.h. BadMatch will be returned if the options
+ given do not match any device. BadValue is returned for a malformed
+ message. (Example: 8 is new device ID 8; -8 is BadMatch.)
+
+ Notably, BadAlloc is never returned: the server internally signals
+ to D-BUS that the attempt failed for lack of memory.
+
+ org.x.config.input.remove:
+ Takes one uint32 argument, which is the device ID to remove, i.e.:
+ u
+ is the signature.
+
+ Returns one signed int32 which represents an X status as defined in
+ X.h. See org.x.config.input.add. Error codes are negative numbers.
+
+ org.x.config.input.listDevices:
+ Lists the currently active devices. No argument.
+ Return value is sequence of [<id> <name>] [<id> <name>] ..., i.e. [us].
diff --git a/xorg-server/config/fdi2iclass.py b/xorg-server/config/fdi2iclass.py
index 9dc06a76f..897444068 100644
--- a/xorg-server/config/fdi2iclass.py
+++ b/xorg-server/config/fdi2iclass.py
@@ -1,202 +1,202 @@
-#!/usr/bin/python
-#
-# Convert xorg keys from hal FDIs files to xorg.conf InputClass sections.
-# Modified from Martin Pitt's original fdi2mpi.py script:
-# http://cgit.freedesktop.org/media-player-info/tree/tools/fdi2mpi.py
-#
-# (C) 2010 Dan Nicholson
-# (C) 2009 Canonical Ltd.
-# Author: Dan Nicholson <dbn.lists@gmail.com>
-# Author: Martin Pitt <martin.pitt@ubuntu.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# fur- nished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
-# NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-import sys, xml.dom.minidom
-
-# dict converting <match> tags to Match* entries
-match_table = {
- 'info.product': 'MatchProduct',
- 'input.product': 'MatchProduct',
- 'info.vendor': 'MatchVendor',
- 'input.vendor': 'MatchVendor',
- 'info.device': 'MatchDevicePath',
- 'linux.device_file': 'MatchDevicePath',
- '/org/freedesktop/Hal/devices/computer:system.kernel.name': 'MatchOS',
- '@info.parent:pnp.id': 'MatchPnPID',
-}
-
-# dict converting info.capabilities list to Match* entries
-cap_match_table = {
- 'input.keys': 'MatchIsKeyboard',
- 'input.keyboard': 'MatchIsKeyboard',
- 'input.keypad': 'MatchIsKeyboard',
- 'input.mouse': 'MatchIsPointer',
- 'input.joystick': 'MatchIsJoystick',
- 'input.tablet': 'MatchIsTablet',
- 'input.touchpad': 'MatchIsTouchpad',
- 'input.touchscreen': 'MatchIsTouchscreen',
-}
-
-def device_glob(path):
- '''Convert a contains device path to a glob entry'''
- if path[0] != '/':
- path = '*' + path
- return path + '*'
-
-def parse_match(node):
- '''Parse a <match> tag to a tuple with InputClass values'''
- match = None
- value = None
- booltype = False
-
- # see what type of key we have
- if node.attributes.has_key('key'):
- key = node.attributes['key'].nodeValue
- if key in match_table:
- match = match_table[key]
- elif key == 'info.capabilities':
- booltype = True
-
- # bail out now if it's unrecognized
- if not match and not booltype:
- return (match, value)
-
- if node.attributes.has_key('string'):
- value = node.attributes['string'].nodeValue
- elif node.attributes.has_key('contains'):
- value = node.attributes['contains'].nodeValue
- if match == 'MatchDevicePath':
- value = device_glob(value)
- elif booltype and value in cap_match_table:
- match = cap_match_table[value]
- value = 'yes'
- elif node.attributes.has_key('string_outof'):
- value = node.attributes['string_outof'].nodeValue.replace(';','|')
- elif node.attributes.has_key('contains_outof'):
- all_values = node.attributes['contains_outof'].nodeValue.split(';')
- for v in all_values:
- if match == 'MatchDevicePath':
- v = device_glob(v)
- elif match == 'MatchPnPID' and len(v) < 7:
- v += '*'
- if value:
- value += '|' + v
- else:
- value = v
-
- return (match, value)
-
-def parse_options(node):
- '''Parse the x11_* options and return InputClass entries'''
- driver = ''
- ignore = False
- options = []
- for n in node.childNodes:
- if n.nodeType != xml.dom.minidom.Node.ELEMENT_NODE:
- continue
-
- tag = n.tagName
- key = n.attributes['key'].nodeValue
- value = ''
-
- if n.hasChildNodes():
- content_node = n.childNodes[0]
- assert content_node.nodeType == xml.dom.Node.TEXT_NODE
- value = content_node.nodeValue
-
- if tag == 'match':
- continue
- assert tag in ('addset', 'merge', 'append', 'remove')
-
- if tag == 'remove' and key == 'input.x11_driver':
- ignore = True
- elif key == 'input.x11_driver':
- driver = value
- elif key.startswith('input.x11_options.'):
- option = key.split('.', 2)[2]
- options.append((option, value))
-
- return (driver, ignore, options)
-
-def is_match_node(node):
- '''Check if a node is a <match> element'''
- return node.nodeType == xml.dom.minidom.Node.ELEMENT_NODE and \
- node.tagName == 'match'
-
-def parse_all_matches(node):
- '''Parse a x11 match tag and any parents that don't supply their
- own options'''
- matches = []
-
- while True:
- (key, value) = parse_match(node)
- if key and value:
- matches.append((key, value))
-
- # walk up to a parent match node
- node = node.parentNode
- if node == None or not is_match_node(node):
- break
-
- # leave if there other options at this level
- children = set([n.tagName for n in node.childNodes
- if n.nodeType == xml.dom.minidom.Node.ELEMENT_NODE])
- if children & set(['addset', 'merge', 'append']):
- break
-
- return matches
-
-# stupid counter to give "unique" rule names
-num_sections = 1
-def print_section(matches, driver, ignore, options):
- '''Print a valid InputClass section to stdout'''
- global num_sections
- print 'Section "InputClass"'
- print '\tIdentifier "Converted Class %d"' % num_sections
- num_sections += 1
- for m, v in matches:
- print '\t%s "%s"' % (m, v)
- if driver:
- print '\tDriver "%s"' % driver
- if ignore:
- print '\tOption "Ignore" "yes"'
- for o, v in options:
- print '\tOption "%s" "%s"' % (o, v)
- print 'EndSection'
-
-def parse_fdi(fdi):
- '''Parse x11 matches from fdi'''
- # find all <match> leaf nodes
- num = 0
- for match_node in fdi.getElementsByTagName('match'):
- children = set([n.tagName for n in match_node.childNodes
- if n.nodeType == xml.dom.minidom.Node.ELEMENT_NODE])
-
- # see if there are any options at this level
- (driver, ignore, options) = parse_options(match_node)
- if not driver and not ignore and not options:
- continue
-
- matches = parse_all_matches(match_node)
- if num > 0:
- print
- print_section(matches, driver, ignore, options)
- num += 1
-
-for f in sys.argv[1:]:
- parse_fdi(xml.dom.minidom.parse(f))
+#!/usr/bin/python
+#
+# Convert xorg keys from hal FDIs files to xorg.conf InputClass sections.
+# Modified from Martin Pitt's original fdi2mpi.py script:
+# http://cgit.freedesktop.org/media-player-info/tree/tools/fdi2mpi.py
+#
+# (C) 2010 Dan Nicholson
+# (C) 2009 Canonical Ltd.
+# Author: Dan Nicholson <dbn.lists@gmail.com>
+# Author: Martin Pitt <martin.pitt@ubuntu.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# fur- nished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
+# NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+import sys, xml.dom.minidom
+
+# dict converting <match> tags to Match* entries
+match_table = {
+ 'info.product': 'MatchProduct',
+ 'input.product': 'MatchProduct',
+ 'info.vendor': 'MatchVendor',
+ 'input.vendor': 'MatchVendor',
+ 'info.device': 'MatchDevicePath',
+ 'linux.device_file': 'MatchDevicePath',
+ '/org/freedesktop/Hal/devices/computer:system.kernel.name': 'MatchOS',
+ '@info.parent:pnp.id': 'MatchPnPID',
+}
+
+# dict converting info.capabilities list to Match* entries
+cap_match_table = {
+ 'input.keys': 'MatchIsKeyboard',
+ 'input.keyboard': 'MatchIsKeyboard',
+ 'input.keypad': 'MatchIsKeyboard',
+ 'input.mouse': 'MatchIsPointer',
+ 'input.joystick': 'MatchIsJoystick',
+ 'input.tablet': 'MatchIsTablet',
+ 'input.touchpad': 'MatchIsTouchpad',
+ 'input.touchscreen': 'MatchIsTouchscreen',
+}
+
+def device_glob(path):
+ '''Convert a contains device path to a glob entry'''
+ if path[0] != '/':
+ path = '*' + path
+ return path + '*'
+
+def parse_match(node):
+ '''Parse a <match> tag to a tuple with InputClass values'''
+ match = None
+ value = None
+ booltype = False
+
+ # see what type of key we have
+ if node.attributes.has_key('key'):
+ key = node.attributes['key'].nodeValue
+ if key in match_table:
+ match = match_table[key]
+ elif key == 'info.capabilities':
+ booltype = True
+
+ # bail out now if it's unrecognized
+ if not match and not booltype:
+ return (match, value)
+
+ if node.attributes.has_key('string'):
+ value = node.attributes['string'].nodeValue
+ elif node.attributes.has_key('contains'):
+ value = node.attributes['contains'].nodeValue
+ if match == 'MatchDevicePath':
+ value = device_glob(value)
+ elif booltype and value in cap_match_table:
+ match = cap_match_table[value]
+ value = 'yes'
+ elif node.attributes.has_key('string_outof'):
+ value = node.attributes['string_outof'].nodeValue.replace(';','|')
+ elif node.attributes.has_key('contains_outof'):
+ all_values = node.attributes['contains_outof'].nodeValue.split(';')
+ for v in all_values:
+ if match == 'MatchDevicePath':
+ v = device_glob(v)
+ elif match == 'MatchPnPID' and len(v) < 7:
+ v += '*'
+ if value:
+ value += '|' + v
+ else:
+ value = v
+
+ return (match, value)
+
+def parse_options(node):
+ '''Parse the x11_* options and return InputClass entries'''
+ driver = ''
+ ignore = False
+ options = []
+ for n in node.childNodes:
+ if n.nodeType != xml.dom.minidom.Node.ELEMENT_NODE:
+ continue
+
+ tag = n.tagName
+ key = n.attributes['key'].nodeValue
+ value = ''
+
+ if n.hasChildNodes():
+ content_node = n.childNodes[0]
+ assert content_node.nodeType == xml.dom.Node.TEXT_NODE
+ value = content_node.nodeValue
+
+ if tag == 'match':
+ continue
+ assert tag in ('addset', 'merge', 'append', 'remove')
+
+ if tag == 'remove' and key == 'input.x11_driver':
+ ignore = True
+ elif key == 'input.x11_driver':
+ driver = value
+ elif key.startswith('input.x11_options.'):
+ option = key.split('.', 2)[2]
+ options.append((option, value))
+
+ return (driver, ignore, options)
+
+def is_match_node(node):
+ '''Check if a node is a <match> element'''
+ return node.nodeType == xml.dom.minidom.Node.ELEMENT_NODE and \
+ node.tagName == 'match'
+
+def parse_all_matches(node):
+ '''Parse a x11 match tag and any parents that don't supply their
+ own options'''
+ matches = []
+
+ while True:
+ (key, value) = parse_match(node)
+ if key and value:
+ matches.append((key, value))
+
+ # walk up to a parent match node
+ node = node.parentNode
+ if node == None or not is_match_node(node):
+ break
+
+ # leave if there other options at this level
+ children = set([n.tagName for n in node.childNodes
+ if n.nodeType == xml.dom.minidom.Node.ELEMENT_NODE])
+ if children & set(['addset', 'merge', 'append']):
+ break
+
+ return matches
+
+# stupid counter to give "unique" rule names
+num_sections = 1
+def print_section(matches, driver, ignore, options):
+ '''Print a valid InputClass section to stdout'''
+ global num_sections
+ print 'Section "InputClass"'
+ print '\tIdentifier "Converted Class %d"' % num_sections
+ num_sections += 1
+ for m, v in matches:
+ print '\t%s "%s"' % (m, v)
+ if driver:
+ print '\tDriver "%s"' % driver
+ if ignore:
+ print '\tOption "Ignore" "yes"'
+ for o, v in options:
+ print '\tOption "%s" "%s"' % (o, v)
+ print 'EndSection'
+
+def parse_fdi(fdi):
+ '''Parse x11 matches from fdi'''
+ # find all <match> leaf nodes
+ num = 0
+ for match_node in fdi.getElementsByTagName('match'):
+ children = set([n.tagName for n in match_node.childNodes
+ if n.nodeType == xml.dom.minidom.Node.ELEMENT_NODE])
+
+ # see if there are any options at this level
+ (driver, ignore, options) = parse_options(match_node)
+ if not driver and not ignore and not options:
+ continue
+
+ matches = parse_all_matches(match_node)
+ if num > 0:
+ print
+ print_section(matches, driver, ignore, options)
+ num += 1
+
+for f in sys.argv[1:]:
+ parse_fdi(xml.dom.minidom.parse(f))
diff --git a/xorg-server/config/x11-input.fdi b/xorg-server/config/x11-input.fdi
index 42489821d..b263f36cb 100644
--- a/xorg-server/config/x11-input.fdi
+++ b/xorg-server/config/x11-input.fdi
@@ -1,93 +1,93 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<deviceinfo version="0.2">
- <device>
-
- <!-- The way this works:
-
- Match against some input device (see the HAL specification for more
- information), and then merge in keys, which you can use to specify
- the configuration similar to the way you would in xorg.conf. You will
- need to restart HAL after making changes. If you are having issues,
- starting X with the -logverbose 7 flag may yield useful information.
-
- Keys Supported:
-
- Key "input.x11_driver" (string)
- This specifies the driver to use. You MUST specify this option,
- or a driver will not be loaded and the rest will be ignored by
- Xorg
-
- Key "input.x11_options.<option name>" (string)
- This allows you to specify arbitrary options to pass to the driver.
- Anything you would normally specify in xorg.conf goes here. So, for
- option "Mode" in xorg.conf, you would specify the key name of
- "input.x11_options.Mode".
-
- Do not specify "input.x11_options.Device" since "input.device"
- will be used automatically.
-
- You MUST specify all options as strings, otherwise the server will
- ignore them.
-
- Legacy Keys
- "input.xkb.rules"
- "input.xkb.model"
- "input.xkb.layout"
- "input.xkb.variant"
- "input.xkb.options"
-
- These keys are deprecated. Use these instead:
- "input.x11_options.XkbRules"
- "input.x11_options.XkbModel"
- "input.x11_options.XkbLayout"
- "input.x11_options.XkbVariant"
- "input.x11_options.XkbOptions"
-
- See the evdev documentation for more information.
-
- FIXME: Support tablets too.
- TODO: I think its fixed, can't test
-
- -->
-
- <match key="info.capabilities" contains="input.mouse">
- <merge key="input.x11_driver" type="string">mouse</merge>
- <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
- string="Linux">
- <merge key="input.x11_driver" type="string">evdev</merge>
- </match>
- <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
- string="SunOS">
- <match key="input.device" contains="usb">
- <merge key="input.x11_options.StreamsModule" type="string">usbms</merge>
- <merge key="input.x11_options.Protocol" type="string">VUID</merge>
- </match>
- </match>
- </match>
-
- <match key="info.capabilities" contains="input.keys">
- <merge key="input.x11_options.XkbRules" type="string">base</merge>
-
- <!-- If we're using Linux, we use evdev by default (falling back to
- kbd otherwise). -->
- <merge key="input.x11_driver" type="string">kbd</merge>
- <merge key="input.x11_options.XkbModel" type="string">pc105</merge>
- <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
- string="Linux">
- <merge key="input.x11_driver" type="string">evdev</merge>
- <merge key="input.x11_options.XkbModel" type="string">evdev</merge>
- </match>
- <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
- string="SunOS">
- <match key="input.device" contains="usb">
- <merge key="input.x11_options.StreamsModule" type="string">usbkbm</merge>
- <merge key="input.x11_options.Protocol" type="string">VUID</merge>
- </match>
- </match>
-
- <merge key="input.x11_options.XkbLayout" type="string">us</merge>
-
- <merge key="input.x11_options.XkbVariant" type="string" />
- </match>
- </device>
-</deviceinfo>
+<?xml version="1.0" encoding="UTF-8"?>
+<deviceinfo version="0.2">
+ <device>
+
+ <!-- The way this works:
+
+ Match against some input device (see the HAL specification for more
+ information), and then merge in keys, which you can use to specify
+ the configuration similar to the way you would in xorg.conf. You will
+ need to restart HAL after making changes. If you are having issues,
+ starting X with the -logverbose 7 flag may yield useful information.
+
+ Keys Supported:
+
+ Key "input.x11_driver" (string)
+ This specifies the driver to use. You MUST specify this option,
+ or a driver will not be loaded and the rest will be ignored by
+ Xorg
+
+ Key "input.x11_options.<option name>" (string)
+ This allows you to specify arbitrary options to pass to the driver.
+ Anything you would normally specify in xorg.conf goes here. So, for
+ option "Mode" in xorg.conf, you would specify the key name of
+ "input.x11_options.Mode".
+
+ Do not specify "input.x11_options.Device" since "input.device"
+ will be used automatically.
+
+ You MUST specify all options as strings, otherwise the server will
+ ignore them.
+
+ Legacy Keys
+ "input.xkb.rules"
+ "input.xkb.model"
+ "input.xkb.layout"
+ "input.xkb.variant"
+ "input.xkb.options"
+
+ These keys are deprecated. Use these instead:
+ "input.x11_options.XkbRules"
+ "input.x11_options.XkbModel"
+ "input.x11_options.XkbLayout"
+ "input.x11_options.XkbVariant"
+ "input.x11_options.XkbOptions"
+
+ See the evdev documentation for more information.
+
+ FIXME: Support tablets too.
+ TODO: I think its fixed, can't test
+
+ -->
+
+ <match key="info.capabilities" contains="input.mouse">
+ <merge key="input.x11_driver" type="string">mouse</merge>
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
+ string="Linux">
+ <merge key="input.x11_driver" type="string">evdev</merge>
+ </match>
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
+ string="SunOS">
+ <match key="input.device" contains="usb">
+ <merge key="input.x11_options.StreamsModule" type="string">usbms</merge>
+ <merge key="input.x11_options.Protocol" type="string">VUID</merge>
+ </match>
+ </match>
+ </match>
+
+ <match key="info.capabilities" contains="input.keys">
+ <merge key="input.x11_options.XkbRules" type="string">base</merge>
+
+ <!-- If we're using Linux, we use evdev by default (falling back to
+ kbd otherwise). -->
+ <merge key="input.x11_driver" type="string">kbd</merge>
+ <merge key="input.x11_options.XkbModel" type="string">pc105</merge>
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
+ string="Linux">
+ <merge key="input.x11_driver" type="string">evdev</merge>
+ <merge key="input.x11_options.XkbModel" type="string">evdev</merge>
+ </match>
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
+ string="SunOS">
+ <match key="input.device" contains="usb">
+ <merge key="input.x11_options.StreamsModule" type="string">usbkbm</merge>
+ <merge key="input.x11_options.Protocol" type="string">VUID</merge>
+ </match>
+ </match>
+
+ <merge key="input.x11_options.XkbLayout" type="string">us</merge>
+
+ <merge key="input.x11_options.XkbVariant" type="string" />
+ </match>
+ </device>
+</deviceinfo>
diff --git a/xorg-server/config/xorg-server.conf b/xorg-server/config/xorg-server.conf
index e80f8df08..47a9a7824 100644
--- a/xorg-server/config/xorg-server.conf
+++ b/xorg-server/config/xorg-server.conf
@@ -1,13 +1,13 @@
-<!DOCTYPE busconfig PUBLIC
- "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
-<busconfig>
- <policy context="default">
- <allow own="org.x.config.display0"/>
- <allow send_destination="org.x.config.display0"/>
- <allow send_interface="org.x.config.display0"/>
- <allow own="org.x.config.display1"/>
- <allow send_destination="org.x.config.display1"/>
- <allow send_interface="org.x.config.display1"/>
- </policy>
-</busconfig>
+<!DOCTYPE busconfig PUBLIC
+ "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+ <policy context="default">
+ <allow own="org.x.config.display0"/>
+ <allow send_destination="org.x.config.display0"/>
+ <allow send_interface="org.x.config.display0"/>
+ <allow own="org.x.config.display1"/>
+ <allow send_destination="org.x.config.display1"/>
+ <allow send_interface="org.x.config.display1"/>
+ </policy>
+</busconfig>