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-2012, 12:51 PM   #1
pepijndevos
Connoisseur
pepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austen
 
Posts: 70
Karma: 23166
Join Date: Sep 2012
Device: Kindle 4NT
select input method

I finally got USB OTG to work, and even recognise HID devices.

The next step would be to actually use it. By default, the Java framework and consequently KindleTERM completely ignore the keyboard.

Not sure about native apps, but native apps for K4 are rare...

I think someone ought to have figured this out, but the search function and google are leaving me in the cold.

I found a reference to waitforkey, which waits for USB keyboard presses as well.

Code:
vi /opt/amazon/ebook/bin/start.sh
-Dextkeyboard=true \
I found that in start.sh it says extkeyboard=false. Setting that to true lets me use the arrows, home, ctrl and maybe a few more to move around. But not type!

Even then, I would probably need to patch KindleTERM to support *any* keyboard at all. Or get Myts to run with the K4's new powers.
pepijndevos is offline   Reply With Quote
Old 10-28-2012, 04:27 PM   #2
aranwe
Enthusiast
aranwe , Klaatu Barada Niktu!aranwe , Klaatu Barada Niktu!aranwe , Klaatu Barada Niktu!aranwe , Klaatu Barada Niktu!aranwe , Klaatu Barada Niktu!aranwe , Klaatu Barada Niktu!aranwe , Klaatu Barada Niktu!aranwe , Klaatu Barada Niktu!aranwe , Klaatu Barada Niktu!aranwe , Klaatu Barada Niktu!aranwe , Klaatu Barada Niktu!
 
Posts: 29
Karma: 5000
Join Date: Jun 2012
Location: CZE
Device: Kindle Touch
shouldnt X server take care of that? ... e.g. xserver-xorg-input-keyboard module ?
by the way : how did you do that?
aranwe is offline   Reply With Quote
Old 10-29-2012, 04:34 AM   #3
pepijndevos
Connoisseur
pepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austen
 
Posts: 70
Karma: 23166
Join Date: Sep 2012
Device: Kindle 4NT
USB OTG: http://www.christian-hoff.com

X11: No. Kindle 4 runs Java on GTK on framebuffer, IIRC.
pepijndevos is offline   Reply With Quote
Old 10-29-2012, 06:40 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,219
Karma: 2124593
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
No GTK there, I think (that's just for the browser).
I guess patching myts is an easier approach than to mess with the Java UI (for now)...

The K4 is becoming more and more interesting as a small computing platform...
hawhill is offline   Reply With Quote
Old 10-29-2012, 07:50 AM   #5
pepijndevos
Connoisseur
pepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austen
 
Posts: 70
Karma: 23166
Join Date: Sep 2012
Device: Kindle 4NT
No big news so far. I found a few kernel modules, tequila_keypad and fiveway that seem to be responsible for the hardware keys. Disabling these makes your kindle hard to use

There is also mxc_keyb which I have not yet tried and uinput which might be used for the virtual keyboard.

Maybe this page makes more sense to some people than it does to me: http://thiemonge.org/getting-started-with-uinput
pepijndevos is offline   Reply With Quote
Old 10-29-2012, 09:12 AM   #6
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: 7,015
Karma: 6359394
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by pepijndevos View Post
Maybe this page makes more sense to some people than it does to me: http://thiemonge.org/getting-started-with-uinput
You might find tcc on the Kindle handy for exploring that uinput article.
(Yes, there are threads here about tcc for the Kindle.)
knc1 is offline   Reply With Quote
Old 10-29-2012, 03:53 PM   #7
hippy dave
Zealot
hippy dave can program the VCR without an owner's manual.hippy dave can program the VCR without an owner's manual.hippy dave can program the VCR without an owner's manual.hippy dave can program the VCR without an owner's manual.hippy dave can program the VCR without an owner's manual.hippy dave can program the VCR without an owner's manual.hippy dave can program the VCR without an owner's manual.hippy dave can program the VCR without an owner's manual.hippy dave can program the VCR without an owner's manual.hippy dave can program the VCR without an owner's manual.hippy dave can program the VCR without an owner's manual.
 
Posts: 124
Karma: 178472
Join Date: Jul 2012
Device: Kindle 4
interesting work, thanks for the update! keep at it
hippy dave is offline   Reply With Quote
Old 10-29-2012, 11:42 PM   #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: 6021146
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
Yep very exciting developments.

a mini usb mouse / kb combo would be super sexy.
twobob is offline   Reply With Quote
Old 11-02-2012, 12:10 PM   #9
pepijndevos
Connoisseur
pepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austen
 
Posts: 70
Karma: 23166
Join Date: Sep 2012
Device: Kindle 4NT
I'm trying to figure out which driver is responsible for the virtual keyboard. I thought I had it with tequila-keypad, but the source code says "GPIO driven tequila keyboard driver".

Upon further inspection, it seems /dev/input/event0/1 are the fiveway and buttons. event2 doesn't give any output whatsoever. Maybe the volume buttons the K4 doesn't have?

If it turns out the virtual keyboard is entirely implemented in Java land, that would be the end to the hackery. But if the browser is indeed GTK, it should cross borders somewhere.

In fact, the browser is the only part I care about. Maybe I need to figure out how GTK is configured. Any ideas about that?
pepijndevos is offline   Reply With Quote
Old 11-02-2012, 03:50 PM   #10
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: 6021146
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
hmm. I have no good answers... so I straced...

[root@kindle root]# strace -fF -o /mnt/us/kb-strace.txt kb

which led me to

Code:
....
13434 open("/usr/lib/libkb.so", O_RDONLY) = 3
13434 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\270-\0\0004\0\0\0"..., 512) = 512
13434 fstat64(3, {st_mode=S_IFREG|0755, st_size=59760, ...}) = 0
13434 mmap2(NULL, 92932, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40045000
13434 mprotect(0x40053000, 32768, PROT_NONE) = 0
13434 mmap2(0x4005b000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe) = 0x4005b000
13434 close(3)                          = 0
....
which led me to:

Here is info on the keyboard

http://www.mobileread.com/forums/sho...8&postcount=28

About the browser:

(from upstart script)
Quote:
source /etc/upstart/env
exec browserd
should get it "loaded" then invoke it via dbus I believe.
(no I got that wrong...sorry... thanks Niluje)

browser would seem to invoke the waf infrastructure (pictured)

Maybe: build midori? that is a decent replacement browser.
It's included in Buildroot by default (I will go check)

You can configure the "browser" (shop) button to launch any application you want - this much I do know. Launch skipstone or midori?

The virtual keyboard - could - of course be replaced with the matchbox keyboard for some instances.

One of the upstart script (I think) had some reference to which was which event on the devices. but I think you nailed it.

Quote:
source /etc/upstart/env

exec kb
was where I started my trail. HTH. (Check the top link - it's pretty handy)
Attached Thumbnails
Click image for larger version

Name:	Selection_320.png
Views:	51
Size:	8.3 KB
ID:	95340  

Last edited by twobob; 11-02-2012 at 04:09 PM. Reason: wrong : )
twobob is offline   Reply With Quote
Old 11-02-2012, 03:59 PM   #11
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 5,274
Karma: 5220867
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2; Kobo H2O
@twobob: webreader is the KF8 renderer. browserd is the browser .
NiLuJe is offline   Reply With Quote
Old 11-02-2012, 04:10 PM   #12
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: 6021146
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 NiLuJe View Post
@twobob: webreader is the KF8 renderer. browserd is the browser .
doh. lol. updated the post. Too busy digging in the 3 - should have looked harder thanks
twobob is offline   Reply With Quote
Old 11-04-2012, 11:43 AM   #13
pepijndevos
Connoisseur
pepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austen
 
Posts: 70
Karma: 23166
Join Date: Sep 2012
Device: Kindle 4NT
twobob, I don't think any of that applies to the K4.

It has no strace, it has no X11, it has no upstart, it does not open the keyboard with lipc-set-prop, it does not have wafapp, it has no libkb.

It does have browserd. You're saying I can send it commands over dbus?

Maybe midori or skipstone is the way to go.

That would make everything usable, if only the centre and menu keys where mapped to something on my keyboard.

Code:
pagedown = next page = 109
pageup = previous page = 191
??? = back = 158
??? = menu = 139
keypad slash = ??? = 98 (same effect as home)
home = home = 102
left ctrl = keyboard = 29
??? = centre = 194
arrow keys = scroll pad = 103,105,106,108

Last edited by pepijndevos; 11-04-2012 at 12:10 PM.
pepijndevos is offline   Reply With Quote
Old 11-04-2012, 12:24 PM   #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: 6021146
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
okay - 1) it has no strace. Make one.

2) No X11. not right now... but we have been working on 1 for the 3...

No upstart, no waf, - inconsequential

3) It does not open the keyboard with lipc-set-prop , REALLY? hmmm. now that surprises me. perhaps a direct invocation. I really wish I could help test but sadly that's not possible.

"I found that in start.sh it says extkeyboard=false. Setting that to true lets me use the arrows, home, ctrl and maybe a few more to move around. But not type!"

Now that doesn't surprise me. On the 5 when one uses VNC to type...in fact i'll take a picture one sec... As you can see a MODIFIER character appears - EVEN if you don't press a modifier key - The funny Right Angle is for SHIFT. the ugly T is for unmodified...

Pressing the keys directly doesn't do this.

Perhaps the overall value from the keys needs amending / truncating. (It could be an artefact of the vnc of course)

Hope that helps.

I tried building midori last few days but got stuck on gtk not building with the old TC properly. I fixed it but it still wont play nice. Hope you have more luck. Skipstone seems a good option having used it.

: )
Attached Thumbnails
Click image for larger version

Name:	Selection_321.png
Views:	374
Size:	26.0 KB
ID:	95429   Click image for larger version

Name:	Selection_322.png
Views:	46
Size:	25.7 KB
ID:	95430  

Last edited by twobob; 11-04-2012 at 12:26 PM.
twobob is offline   Reply With Quote
Old 11-04-2012, 12:31 PM   #15
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: 6021146
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:
"It does have browserd. You're saying I can send it commands over dbus?"
I'm having a quick play with this now. see what falls out

hmm... My Lipc is dead. odd.

nano -w /etc/lipc-daemon-props.conf

Quote:
# This file defines what properties are exposed by lipc-daemon.
orientation r cat /proc/accelerometer | xargs echo -n
usid r cat /proc/usid | xargs echo -n
boardid r cat /proc/boardid | xargs echo -n
version r cat /etc/version.txt | xargs echo -n
waveformversion r cat /proc/eink_fb/waveform_version | xargs echo -n
date w /usr/sbin/setdate
sendEvent w lipc-send-event com.lab126.system.event
hmm..

[root@kindle root]# lipc-probe -l
com.lab126.pmond
com.lab126.audio
com.lab126.wan
com.lab126.ttsd
com.lab126.tts
com.lab126.powerd
com.lab126.system
com.lab126.wifid
com.lab126.framework
com.lab126.transfer
com.lab126.phd
com.lab126.volumd
com.lab126.webreaderListener
com.lab126.cmd
com.lab126.cvm
com.lab126.mcsd
org.freedesktop.DBus


Hmm..
Just not sure... I don't see any easy wins yet. still looking

Last edited by twobob; 11-04-2012 at 12:59 PM.
twobob 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
[Input Plugin] DOCX Input SauliusP. Plugins 42 06-05-2013 05:01 AM
Touch how to enable third-party input method in rooted nook touch tigerszheng Barnes & Noble NOOK 5 10-24-2011 09:30 PM
Select all function megrose0222 Library Management 3 08-31-2011 08:31 PM
select all alansplace Calibre 4 08-03-2011 07:46 PM
Android Penpower Input Method on Edge? ricco enTourage Archive 0 04-26-2010 01:11 AM


All times are GMT -4. The time now is 11:01 PM.


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