diff -ruN rhpxl-0.41.1/rhpxl/ilomouse.py rhpxl-0.41.1-hp/rhpxl/ilomouse.py --- rhpxl-0.41.1/rhpxl/ilomouse.py 1969-12-31 17:00:00.000000000 -0700 +++ rhpxl-0.41.1-hp/rhpxl/ilomouse.py 2008-01-17 14:30:33.000000000 -0700 @@ -0,0 +1,31 @@ +# +# ilomouse.py - finds the HP iLO 2 virtual mouse +# +# Copyright (C) 2008 Hewlett-Packard Development Company, L.P. +# +# This software may be freely redistributed under the terms of the GNU +# library public license. +# +# You should have received a copy of the GNU Library Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +import kudzu + +class ilomouseCheck: + def isDevicePresent(self): + return self.deviceExist + + def probe (self): + lst = kudzu.probe(kudzu.CLASS_MOUSE, kudzu.BUS_USB, + kudzu.PROBE_ALL) + + for card in lst: + (device, driver, descr) = card + if descr == "HP Virtual Management Device": + self.deviceExist = 1 + + def __init__ (self): + self.deviceExist = 0 + self.probe() + diff -ruN rhpxl-0.41.1/rhpxl/xhwstate.py rhpxl-0.41.1-hp/rhpxl/xhwstate.py --- rhpxl-0.41.1/rhpxl/xhwstate.py 2007-05-23 14:33:43.000000000 -0600 +++ rhpxl-0.41.1-hp/rhpxl/xhwstate.py 2008-01-17 14:23:10.000000000 -0700 @@ -24,6 +24,7 @@ import ibmasm from rhpl.translate import _, N_ import rhpl +import ilomouse try: import _pyrandr @@ -734,4 +735,22 @@ ibmasm_ref = xf86config.XF86ConfInputref("ibmasm_remote", "") inputs.insert(ibmasm_ref) + ## Check for HP iLO 2 virtual mouse and if it exists configure evdev + ilomousehw = ilomouse.ilomouseCheck() + if ilomousehw.isDevicePresent(): + print _("Found HP Virtual Mouse") + ilomouse_conf = xf86config.XF86ConfInput() + xconfig.input.insert(ilomouse_conf) + ilomouse_conf.identifier = "ilomouse" + ilomouse_conf.driver = "evdev" + get_option(ilomouse_conf, "Device").val = "/dev/input/hp_ilo_mouse" + get_option(ilomouse_conf, "MinX").val = "0" + get_option(ilomouse_conf, "MinY").val = "0" + get_option(ilomouse_conf, "MaxX").val = "3000" + get_option(ilomouse_conf, "MaxY").val = "3000" + get_option(ilomouse_conf, "SendCoreEvents").val = "True" + inputs = xconfig.layout[0].inputs + ilomouse_ref = xf86config.XF86ConfInputref("ilomouse", "") + inputs.insert(ilomouse_ref) + return xconfig