View Single Post
Old 08-17-2016, 12:46 PM   #48
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Quote:
Originally Posted by knc1 View Post
...
How does someone use a KUAL extension to install the external mouse handler when the touch screen isn't working?...
Why not add a u-dev rule that installs the external mouse handler when the external mouse is plugged in?

yeah, In hindsight that didn't make a lot of sense.

Right now i'm at the point where my script
Loads the .ko modules
mount --bind to a custom makexconf and cursor
restart x

I have seperately my program that refreshes the cursor on the screen that needs to run as a daemon ( its not daemonized yet )

I was next going to try to use /dev/uniput to create a "mouse" thats active wether or not an actual mouse is connected.

This is becuase xorg.conf apparenlty cannot respect hotplugging evdev devices, it needs to have /dev/input/eventX thats active at the time it is restarted. And if you ever unplug it, you need to restart x after its plugged in again. the PW implementation alo won't load the "mouse" driver, to use '/dev/input/mice'.

The idea there being that the daemon 'pointer.c' would be able to detect a real mouse plugged unplugged and clone all the events into /dev/uinput, opened up, so that whenever the daemon is running, there will be a mouse, it just won't generate events unless an actual mouse is plugged in.

( I dont want to force an x restart every time the mouse is plugged in )


leading to a final script that looks like:

load hid.ko and friends
start daemon with
bind makexconf and cursor ( based on device - or patch makexconf instead of harcoding )
restart x


for the cloning, this code might be something to look at,
https://github.com/MerlijnWajer/uinp...master/c/map.c

Does anyone have any good info on udev, where rules live on the kindle or otherwise?


The refreshing program is based on xrefresh.c: http://opensource.apple.com//source/...0.2/xrefresh.c

Mixed with a program called hhpc: https://github.com/aktau/hhpc/blob/master/hhpc.c

From hhpc I took the code that eavesdrops on all mouse movemnt events, and then passes them along to where they should go.

From xfrefresh I took the actual refresh part - open a transparent window over the whole screen, which will redraw the mouse ( when I had it only drawing over the cursor location, it would leave multiple cursors )

Last edited by coplate; 08-17-2016 at 03:04 PM.
coplate is offline   Reply With Quote