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-22-2013, 11:00 PM   #1
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Lightbulb luakit - Lightweight web browser

Luakit. latest revision.. (Luakit 039e319)

I will bundle this WITH midori when the time comes. might as well as the libs are so similar, get more bang for our buck on the library space used that way...

(It does not, yet, have a custom libwebkitgtk to handle uploading - which is still cooking)
So WARNING: Choosing to Upload a File will hang it... (Unless you use fronter)

https://dl.dropboxusercontent.com/u/...uakit-KUAL.zip

thanks.
Attached Thumbnails
Click image for larger version

Name:	screenshot_2013_10_23T02_51_51+0000.png
Views:	141
Size:	27.6 KB
ID:	113861   Click image for larger version

Name:	screenshot_2013_10_23T19_36_16+0000.png
Views:	103
Size:	20.0 KB
ID:	113888   Click image for larger version

Name:	screenshot_2013_10_23T19_36_41+0000.png
Views:	84
Size:	20.4 KB
ID:	113889  

Last edited by twobob; 10-24-2013 at 11:06 AM. Reason: Eureka fixed the keyboard toggler
twobob is offline   Reply With Quote
Old 10-22-2013, 11:15 PM   #2
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
EDIT: So, the keyboard toggling problem is solved...

Quote:
-- Zooming

"+", "Enlarge text zoom of the current page.",

"-", "Reduce text zom of the current page.",

"=", "Reset zoom level.",
you will want to EDIT the /mnt/us/extensions/luakit/usr/bin/config/binds.lua to remap your favourite functions to keys the amazon keyboard can handle...

It's pretty obvious what to do.

Last edited by twobob; 10-23-2013 at 08:20 AM.
twobob is offline   Reply With Quote
Old 10-22-2013, 11:23 PM   #3
brianinmaine
Addict
brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.
 
brianinmaine's Avatar
 
Posts: 377
Karma: 1277063
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
http://developer.coronalabs.com/cont...-and-listeners has lua stuff about touch events...

still looking.

http://docs.coronalabs.com/guide/eve...uch-multitouch

http://www.mindfiresolutions.com/Mov...g-Lua-2219.php

seems you need a function to call the keyboard, then add an eventlistener to listen for touch screen events?? I know nothing of lua!!

http://www.think-techie.com/2011/08/...-keyboard.html

Last edited by brianinmaine; 10-23-2013 at 12:07 AM.
brianinmaine is offline   Reply With Quote
Old 10-23-2013, 03:04 AM   #4
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,083
Karma: 2114647
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
This is not really about Lua and not about finding keyboard implementations with a Lua API. Luakit just offers a (small, at a first glance) Lua API. What you are searching for is a good point to trigger a keyboard pop-up. I can't see a good point for that in the Lua API, so it's back to C then. Well, probably it's so closely entangled with GTK that the proper point to show up a keyboard is within GTK code anyway.
hawhill is offline   Reply With Quote
Old 10-23-2013, 03:33 AM   #5
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
I don't care where I get it.

All i need is Screen X & Y.

Anything...

And this thing can run any LUA by its very modal nature, windows.lua can be constructed to do ones bidding

Seems like such a simple request... and yet... I'm struggling
twobob is offline   Reply With Quote
Old 10-23-2013, 03:50 AM   #6
brianinmaine
Addict
brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.
 
brianinmaine's Avatar
 
Posts: 377
Karma: 1277063
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
"xtestlab126 -d" shows all the touch events... ?? there MUST be something better!

"cat /dev/input/event3" shows garbage on screen when touched?
Oh - thats what evtest is for "evtest /dev/input/event3"

Last edited by brianinmaine; 10-23-2013 at 04:39 AM.
brianinmaine is offline   Reply With Quote
Old 10-23-2013, 05:03 AM   #7
Aeris
Developer's Corner Mascot
Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.
 
Aeris's Avatar
 
Posts: 484
Karma: 1274186
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
Quote:
Originally Posted by twobob View Post
I don't care where I get it.

All i need is Screen X & Y.

Anything...

Don't know if I got exactly what you mean... If you need screen width and height I've found this script on kterm launch one:

Code:
#WIDTH=`xwininfo -root|grep Width|cut -d ':' -f 2`
# use wider keyboard layout for screen width greater than 600 px
#if [ ${WIDTH} -gt 600 ]; then
#  PARAM="-l ${EXTENSION}/layouts/keyboard-wide.xml"
#fi
So it would be:

Code:
WIDTH=`xwininfo -root|grep Width|cut -d ':' -f 2`
HEIGHT=`xwininfo -root|grep Height|cut -d ':' -f 2`
If you meant the X Y cursor position... ignore this comment xD

Last edited by Aeris; 10-23-2013 at 05:05 AM.
Aeris is offline   Reply With Quote
Old 10-23-2013, 05:10 AM   #8
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
ah right, no. perhaps I should have been more specific.
"On click, what is the X and Y location"

I was messing with evtest last night (from geekmasters scripts) and Brian has just reminded me again this morning of it.

I'll hack something out of that.

Thanks
twobob is offline   Reply With Quote
Old 10-23-2013, 05:13 AM   #9
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by brianinmaine View Post
"xtestlab126 -d" shows all the touch events... ?? there MUST be something better!

"cat /dev/input/event3" shows garbage on screen when touched?
Oh - thats what evtest is for "evtest /dev/input/event3"
hmm it's event0 on the PW. I'll do a test for the device then first, thus determining the right event#. Then horror-story trace the content.

Thanks

My brain is losing it's flexibility I fear...
twobob is offline   Reply With Quote
Old 10-23-2013, 05:15 AM   #10
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,083
Karma: 2114647
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Oh, I misunderstood the question. It is about manual triggering the keyboard... as brianinmaine told, evtest can print parsed output of the touchpad input event devices.

twobob, do you want to trigger the keyboard popup in java code or in another program/script running parallel to luakit?

You might prefer "xev" to "evtest". You can run "xev -root" to get all events, mask events with "-event" or get events for a given window with "-id" or "-name".

Last edited by hawhill; 10-23-2013 at 05:19 AM. Reason: it's -event, not -mask
hawhill is offline   Reply With Quote
Old 10-23-2013, 05:18 AM   #11
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
ah... Thanks : ) I'll give that a try then. Every time I ran xev in the past it never spitted out what I expected. I'll give it another go then...

I /think/ -name is the name of the xev window itself... but -id could work...
appreciated.

xev -id $(xwininfo -tree -root | awk '/Luakit Browser Framework/ {print $1}') 2> /dev/null | awk '/root/ {print $7} ' | tr -d ')' | cut -d"," -f2 | awk '$0 < 50 {system("/mnt/us/extensions/luakit/usr/bin/toggleKeys close")}' || awk '$0 > 700 {system("/mnt/us/extensions/luakit/usr/bin/toggleKeys open")}' helpful...

Last edited by twobob; 10-23-2013 at 07:05 AM.
twobob is offline   Reply With Quote
Old 10-23-2013, 05:19 AM   #12
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 711
Karma: 2290994
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
hawhill nailed it. Just change the C part of luakit to handle mouse click on this area (because taps are recognized by X application as ordinary click of left button).

It's not possible within Lua (if you're don't want to mess with C part beforehand, exposing click event to Lua part). Top right part of status bar is filled by label widgets, which aren't exposing click events by default.

UPD: oh, I was wrong for it not being possible. That's what I did to test the way on my computer (NOT on Kindle):
  1. Code:
    $ mkdir $HOME/.config/luakit
    $ cp /etc/xdg/luakit/binds.lua $HOME/.config/luakit
  2. Add this to my custom binds.lua:
    Code:
    window.init_funcs["handle click on status bar (except of part filled by selectable lables)"] =
      function (w)
        w.sbar.ebox:add_signal("button-release", function (v, mods, button, context)
          print(button) -- prints 1 for left click
        end)
      end
And it printed 1 to standard output every time when I clicked status bar (except the url part, which handles clicks on its own).

Also:
Code:
$ luakit --version
luakit 039e319

Last edited by eureka; 10-23-2013 at 05:34 AM.
eureka is offline   Reply With Quote
Old 10-23-2013, 05:31 AM   #13
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,083
Karma: 2114647
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Yeah, that's the clean approach. Grabbing all X server or input events in a separate process is another option, though. A bit messy, since it will need to wade through all events coming in, though.
hawhill is offline   Reply With Quote
Old 10-23-2013, 05:35 AM   #14
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by eureka View Post
hawhill nailed it. Just change the C part of luakit to handle mouse click on this area (because taps are recognized by X application as ordinary click of left button).

It's not possible within Lua (if you're don't want to mess with C part beforehand, exposing click event to Lua part). Top right part of status bar is filled by label widgets, which aren't exposing click events by default.
I have no "problem with" hacking any part of it... just needing some guidance, or even a little help. Yep - that (exposing/attaching the click events to labels) was what I (and knc1) were working on last night - plumbing the click events in the labels seemed the perfect solution.. after quite a while of not "getting it done" I passed out but recognised that would be the tidiest solution :\


Quote:
Originally Posted by hawhill View Post
Yeah, that's the clean approach. Grabbing all X server or input events in a separate process is another option, though. A bit messy, since it will need to wade through all events coming in, though.
I can handle messy. "Done" is really all I want at this point...

6 hours sleep in 3 days is hurting my ability to think. At least, that is what I tell myself....
twobob is offline   Reply With Quote
Old 10-23-2013, 05:41 AM   #15
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 711
Karma: 2290994
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by twobob View Post
I have no "problem with" hacking any part of it... just needing some guidance, or even a little help. Yep - that (exposing/attaching the click events to labels) was what I (and knc1) were working on last night - plumbing the click events in the labels seemed the perfect solution.. after quite a while of not "getting it done" I passed out but recognised that would be the tidiest solution :\
OK. I don't want to participate in hacking of the C part (it's bo-o-ring, ti-i-iring and I ain't even use luakit), but you should look at update in my previous post.

UPD: as keyboard could be invoked through LIPC, information on accessing LIPC from Lua might be useful.

Last edited by eureka; 10-23-2013 at 05:45 AM.
eureka is offline   Reply With Quote
Reply

Tags
luakit.

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle Fire Web Browser will likely allow for web based games. sirmaru Kindle Fire 10 11-15-2011 02:55 PM
Touch Web Browser shighfield Kobo Reader 3 07-28-2011 12:48 AM
602 web browser nel PocketBook 8 06-14-2011 08:25 AM
Kindle 3 lightweight web server for local browsing? nogre Kindle Developer's Corner 1 12-23-2010 03:42 AM


All times are GMT -4. The time now is 07:41 AM.


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