View Single Post
Old 06-23-2013, 05:59 PM   #398
inedible
Junior Member
inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.
 
Posts: 8
Karma: 26290
Join Date: Apr 2013
Device: Kindle PW
Quote:
Originally Posted by Cykotitan View Post
I am amazed by your work. I've just been experimenting on my paperwhite and I made it possible to click by editing config.lua:
...
Awesome! Thank you! That works really well.

To make it work in landscape mode I had to swap Y and X, and invert Y:

Code:
clickevent = 0
x, y = 0, 0

-- this handler will be called upon key presses (input events, actually)
function handleInput(channel, itype, code, value)
	if itype == 3 then
		if code == 57 then
			clickevent = value + 1
			if x and y then
				SendPointerEvent(y, x, 0)
			end
		elseif code == 53 then
			x = value
		elseif code == 54 then
			y = math.abs(value - 1024)
			if clickevent == 1 then
				SendPointerEvent(y, x, 1)
			end
		end
end
It seems you were also missing an "end" at the end, but otherwise that works great!

Now, if only there was a way to rotate the screen without having to SSH into it while reading a book in landscape...

Last edited by inedible; 06-23-2013 at 06:06 PM.
inedible is offline   Reply With Quote