Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-28-2014, 10:44 AM   #1
miomaz
Junior Member
miomaz began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2012
Device: kindle 4.1.0
Smile Get keystrokes over putty

hi,

I've been fooling around on my kindle (k4nt), (got USBnetwork to work, tried to setup vncviewer by hawhill, used kranu's webserver), in an attempt to play NEOscavenger on my kindle. Is there a way to have the kindle send keystrokes to the pc, possibly over putty?
I could then have kranus webserver running and program a small autoit3 script that translates the kindle output into windows keystrokes and mouse movements. I picture the kindle sending the pressed keys, it popping up as some identfying string in the putty console. Then I could copy the console's contents to the clipboard and parse for the identifying

Neoscavenger is a pretty baddass survival game check it out: Neoscavenger

thanks in advance.

Last edited by Dr. Drib; 10-28-2014 at 11:42 AM.
miomaz is offline   Reply With Quote
Old 10-28-2014, 11:54 AM   #2
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 65,008
Karma: 43118253
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Mini, iPhone 4, MS Surface Pro, N7
Please use the forums correctly. This clearly belongs in the Kindle Developers' forum, to where I'm moving it.

Thanks.
HarryT is offline   Reply With Quote
 
Advertisement
Old 10-28-2014, 01:26 PM   #3
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,186
Karma: 2116649
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
I can't see that it would be a pleasurable exercise at all.
The graphics will be awful (low-contrast in the game means almost no contrast whatsoever on the Kindle).
The input - well, the number of keys is limited. Controlling a mouse cursor with that - ugh.

That said, it shouldn't be all that hard to script the needed parts in kindlevncviewer - but of course, you would need to learn a bit of Lua scripting. It's well possible that forwarding keypresses does work already.
hawhill is offline   Reply With Quote
Old 10-28-2014, 02:04 PM   #4
knc1
Helpdesk Junkie
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,855
Karma: 6314522
Join Date: Feb 2012
Device: Too many.
Then again, from a K4 OSK - maybe not.
knc1 is offline   Reply With Quote
Old 10-28-2014, 02:13 PM   #5
miomaz
Junior Member
miomaz began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2012
Device: kindle 4.1.0
This game is perfect for it, because it's more or less a board game lacking animations. the main map looks alittle like die Siedler von Catan with its Hexagonal tiles. Plus I use something called NegativeScreen to adjust the colors and of course inverse the brightness of the monitor. The game is partially played with a mouse, but I can automate the mouseclicks with autoit, and also draw on the screen to see what I select in the game.
Anyhow, could you point me to some website/tutorial that might help me code this lua? In pseudo code i think all that needs scripting is:

If (button x pressed) {
//send message to putty
}

could you translate that into viable code? or is it more complicated than that?
miomaz is offline   Reply With Quote
Old 10-28-2014, 06:05 PM   #6
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,186
Karma: 2116649
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
I mentioned Lua because kindlevncviewer is scripted in Lua. But it is only prepared to send keystrokes (and, by the way, mouse pointer actions, i.e. absolute "movements") to the VNC server. So - not via PuTTY/SSH, but via VNC.

Just to get things straight: You want to forward the screen, too? And you want to use the "webserver" based way, i.e. emonitor? Or VNC? Via eMonitor, I guess your options are restricted to what the web browser actually can offer via event interfaces (I have no idea if it would work at all). Via VNC, and the vncviewer on the Kindle, you just have to push the proper events to the VNC server. You would probably have to extend https://github.com/hwhw/kindlevncvie...ter/config.lua to handle all the keys that the K4 offers (all keys handled now are K3/KDX centric). When you look at the file, you see the logic that sends a key event to the server - using the XK_Keyname constants - when a keypress is seen on the Kindle (the KEY_... events). K4 keys would probably have to be added. I'd add a line at the bottom, after all the
Code:
elseif code == KEY...
lines, that looks like this:
Code:
else print("unknown key event, code", code)
and then see what it outputs on console when you press the K4 keys. When you have the event codes, you can add your own lines, sending keystrokes to the VNC server.
hawhill is offline   Reply With Quote
Old 10-29-2014, 04:52 PM   #7
miomaz
Junior Member
miomaz began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2012
Device: kindle 4.1.0
I figured it would only work through your vncviewer when you mentioned the lua scripts. So yes, this project is intended for the vncviewer (plus the emonitor runs over the webbrowser ans consequently has that ugly bar that eats up 50 pixels or so). You have my thanks, I will see if I can get this to work and keep you guys updated.
miomaz is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can we load putty into the LUNIX in kindle paper white? edyedy Kindle Developer's Corner 9 08-09-2013 09:24 AM
KPW Win8 x64 PuTTy network error: connection refused Bagerfahrer Kindle Developer's Corner 2 01-19-2013 01:18 PM
K4 Think I need to rename path in PuTTY? Caterix Kindle Developer's Corner 3 09-07-2012 09:26 AM
K5 Kindle Touch and PuTTy qrafzv Kindle Developer's Corner 19 06-20-2012 05:08 PM


All times are GMT -4. The time now is 12:45 AM.


MobileRead.com is a privately owned, operated and funded community.