View Single Post
Old 05-26-2013, 08:54 PM   #397
Cykotitan
Enthusiast
Cykotitan is kind to children and small, furry animalsCykotitan is kind to children and small, furry animalsCykotitan is kind to children and small, furry animalsCykotitan is kind to children and small, furry animalsCykotitan is kind to children and small, furry animalsCykotitan is kind to children and small, furry animalsCykotitan is kind to children and small, furry animalsCykotitan is kind to children and small, furry animalsCykotitan is kind to children and small, furry animalsCykotitan is kind to children and small, furry animalsCykotitan is kind to children and small, furry animals
 
Posts: 44
Karma: 6550
Join Date: May 2013
Location: Bosnia & Herzegovina
Device: Kindle Paperwhite 1 WiFi
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: (bold = code added by me)
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(x, y, 0)
			end
		elseif code == 53 then
			x = value
		elseif code == 54 then
			y = value
			if clickevent == 1 then
				SendPointerEvent(x, y, 1)
			end
		end
If anyone more experienced would like to optimize the code, feel free to do so and I'll edit my post afterwards. After all, this isn't my field in scripting.

P.S. one of the things I found hard to perform were doubleclicking. I suppose it requires 2 subsequent clicks on the same coordinates.

Last edited by Cykotitan; 10-28-2013 at 11:29 AM.
Cykotitan is offline   Reply With Quote