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 09-25-2017, 05:54 AM   #346
nasser
Evangelist
nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.
 
nasser's Avatar
 
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
Quote:
Originally Posted by knc1 View Post
...
If you don't have anything installed that depends on en_GB set of jar files, change the settings to match the other two, just in case it makes a difference.
...
Will try it and check.

knc1, Can you check if the end key works on your pw3 and kt3?
nasser is offline   Reply With Quote
Old 09-25-2017, 06:04 AM   #347
nasser
Evangelist
nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.
 
nasser's Avatar
 
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
The end key is working on PW1 with en_GB.
Changed language on PW1 to en_US.
The end key still works.

Now, I'll try changing the setting on PW3 and KT3 to en_GB and get back.
nasser is offline   Reply With Quote
Advert
Old 09-25-2017, 08:03 AM   #348
baf
Evangelist
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 404
Karma: 2200000
Join Date: May 2012
Device: kt
Please try with attached kterm binary.
I recompiled vte library with debug enabled.

To show debug output you need to ssh to you kindle export VTE_DEBUG environment variable and start attached binary.

Code:
export VTE_DEBUG="signals,io,lifecycle,pty,keyboard,work,timeout,draw,ally,pangocairo,events,updates,adj,misc,parse,selection,substitution,ring,cursor,matcher,cel
ls,widget-size,style,resize"
The variable contains list of individual debug options. We don't need all of them enabled. You can probably skip some if you realize they are useless for our investigation. Or just post output of all enabled.

Most interesting options output while pressing End

Option "keyboard":

Code:
[root@kindle bin]# export VTE_DEBUG="keyboard"
[root@kindle bin]# ./kterm-debug
Mapping GDK_End via ncurses to '<0x1b>OF', returning.
Sending <1b> to child.
Sending 'O' to child.
Sending 'F' to child.
Maybe there are differences in ncurses on newer platforms?

Option "io":

Code:
[root@kindle bin]# export VTE_DEBUG="io"
[root@kindle bin]# ./kterm-debug
Set terminal encoding to `UTF-8'.
polling vte_terminal_io_read
Feed 29 bytes, in 1 chunks.
read 29/4096 bytes, again? yes, active? yes
read 29/4096 bytes, again? yes, active? no
Handler processing 29 bytes over 1 chunks + 0 bytes pending.
0 chars and 0 bytes in 1 chunks left to process.
Wrote ^[
Wrote  O
Wrote  F
Option "events":
Code:
[root@kindle bin]# export VTE_DEBUG="events"
[root@kindle bin]# ./kterm-debug
Keypress, modifiers=0x0, keyval=0xffe7, raw string=`(null)'.
Keypress, modifiers=0x0, keyval=0xff57, raw string=`(null)'.
Attached Files
File Type: zip kterm-debug.zip (376.0 KB, 185 views)
baf is offline   Reply With Quote
Old 09-25-2017, 12:12 PM   #349
nasser
Evangelist
nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.
 
nasser's Avatar
 
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
Quote:
Originally Posted by nasser View Post
The end key is working on PW1 with en_GB.
Changed language on PW1 to en_US.
The end key still works.

Now, I'll try changing the setting on PW3 and KT3 to en_GB and get back.
Changed setting on PW3 and KT3 to en_GB. No effect. End key still doesn't work.
nasser is offline   Reply With Quote
Old 09-25-2017, 01:08 PM   #350
nasser
Evangelist
nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.
 
nasser's Avatar
 
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
Quote:
Originally Posted by baf View Post
Please try with attached kterm binary.
I recompiled vte library with debug enabled.
...
...
Thanks, baf!

Most of the debug options are not significant.
I'm giving below the ones which are. The output in bold is what is triggered after pressing the mod1 and end keys.

Option: "signals":
Code:
PW1 gives:
"Emitting `encoding-changed'.
Emitting `emulation-changed'.
Emitting adjustment_changed.
Emitting `char-size-changed'.
Queueing `contents-changed'.
Emitting adjustment_changed.
Queueing `contents-changed'.
Emitting adjustment_changed.
Emitting `contents-changed'.
Queueing `contents-changed'.
Emitting adjustment_changed.
Emitting buffered `text-inserted'
Emitting buffered `text-deleted'
Emitting `contents-changed'.
Queueing `cursor-moved'.
Emitting `cursor-moved'.
Emitting `commit' of 3 bytes."

PW3 and KT3 give the same, but the last line is missing.
Option: "io"
Code:
PW1 gives:
"Set terminal encoding to `UTF-8'.
polling vte_terminal_io_read
Feed 29 bytes, in 1 chunks.
read 29/4096 bytes, again? yes, active? yes
read 29/4096 bytes, again? yes, active? no
Handler processing 29 bytes over 1 chunks + 0 bytes pending.
0 chars and 0 bytes in 1 chunks left to process.
Wrote ^[
Wrote  O
Wrote  F"


PW3 and KT3 give the same, but the last 3 lines are missing.
Option: "keyboard":
Code:
PW1 gives:
"Mapping GDK_End via ncurses to '<0x1b>OF', returning.
Sending <1b> to child.
Sending 'O' to child.
Sending 'F' to child."


PW3 and KT3 give only:
Mapping GDK_End (ignoring, no match for modifier state).
Option : "events":
Code:
PW1, PW3 and KT3 all give the same:

Keypress, modifiers=0x0, keyval=0xffe7, raw string=`(null)'.
Keypress, modifiers=0x0, keyval=0xff57, raw string=`(null)'
Option: "adj":
Code:
PW1, PW3 and KT3 all give the same:

"Changing step increment from 0 to 24
Changing page size from 0 to 24
Changing page increment from 0 to 24
Changing page size from 24 to 27
Changing page increment from 24 to 27
Changing upper bound from 0 to 1
Snapping to bottom of screen
Changing upper bound from 1 to 27
Snapping to bottom of screen"
nasser is offline   Reply With Quote
Advert
Old 09-25-2017, 05:47 PM   #351
baf
Evangelist
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 404
Karma: 2200000
Join Date: May 2012
Device: kt
Nasser!
Thanks a lot for the debugging. I think I know what is going on.
The crucial part is this:

Code:
PW1 gives:
"Mapping GDK_End via ncurses to '<0x1b>OF', returning.

PW3 and KT3 give only:
Mapping GDK_End (ignoring, no match for modifier state).
VTE first tries to check the mapping in termcap file, but there is no entry for End key. Then it tries a lookup in terminfo database. There is terminfo entry for xterm on my KT (with End key mapping), but it is probably missing on newer kindles (I remember some problems with that).

Please try following solution:
Start kterm with TERMINFO variable, like this:

Code:
[root@kindle bin]# TERMINFO=/mnt/us/extensions/kterm/vte/terminfo ./kterm
If it works we will just have to add this to kterm.sh script.
I was fooled by TERMINFO env being present in kterm environment, but I didn't think that it is not accessible to VTE library, only to programs running in terminal.

Hope this helps
baf is offline   Reply With Quote
Old 09-25-2017, 08:58 PM   #352
nasser
Evangelist
nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.
 
nasser's Avatar
 
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
That fixed it!
Now end keys work on PW3 and KT3!
Great detective work, baf!
nasser is offline   Reply With Quote
Old 09-25-2017, 09:06 PM   #353
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
NiLuJe has a large number of extra applications included in the USBnetworking package.
That includes Nano -
For which he ships his own build of termcap.
I don't recall the details, but the general reason is variations in things missing/supported in the various firmware versions.
knc1 is offline   Reply With Quote
Old 09-26-2017, 04:15 AM   #354
baf
Evangelist
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 404
Karma: 2200000
Join Date: May 2012
Device: kt
Quote:
Originally Posted by knc1 View Post
NiLuJe has a large number of extra applications included in the USBnetworking package.
That includes Nano -
For which he ships his own build of termcap.
I don't recall the details, but the general reason is variations in things missing/supported in the various firmware versions.
You are right.
AFAIR newer Kindles lack terminfo entry for xterm emulation. That's why I included terminfo in kterm package. Some programs run in kterm complained about it missing, as default emulation in kterm is xterm.

But I didn't realize the Vte library also uses terminfo as a fallback to termcap (via ncurses). And Vte didn't know the path to the custom terminfo database.

I'll prepare new package.
baf is offline   Reply With Quote
Old 09-26-2017, 06:50 AM   #355
baf
Evangelist
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 404
Karma: 2200000
Join Date: May 2012
Device: kt
kterm 2.4

New release is on github.

Thanks again to nasser and knc1 for help!
baf is offline   Reply With Quote
Old 09-26-2017, 09:54 AM   #356
nasser
Evangelist
nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.
 
nasser's Avatar
 
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
Quote:
Originally Posted by baf View Post
New release is on github.

Thanks again to nasser and knc1 for help!
Works OK on PW3 and KT3.
Thanks, baf!
nasser is offline   Reply With Quote
Old 03-08-2018, 10:27 PM   #357
philip_goule
Enthusiast
philip_goule began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Dec 2016
Device: kindle paperwhite2
Quote:
Originally Posted by baf View Post
Hi,
My port of XTerm stopped working with 5.3 firmware. Instead of trying to revive it I took another way. I wrote a very simple GTK+ terminal emulator based on VteTerminal library.
It is available for testing here.
I run it successfully on KT 5.3.2 firmware. It is reported to run fine on Paperwhite. I believe it should also be compatible with 5.1 firmware.
UPDATE: It is reported to run on following devices: KT, KT2, KT3, PW1, PW2, PW3.
Any feedback welcome
how to use the terminal programs built for Kindle Touch 5.1–5.3?
philip_goule is offline   Reply With Quote
Old 03-08-2018, 11:12 PM   #358
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by philip_goule View Post
how to use the terminal programs built for Kindle Touch 5.1–5.3?
No change required to the directions, just use them as described.
knc1 is offline   Reply With Quote
Old 03-09-2018, 12:38 AM   #359
philip_goule
Enthusiast
philip_goule began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Dec 2016
Device: kindle paperwhite2
Quote:
Originally Posted by philip_goule View Post
how to use the terminal programs built for Kindle Touch 5.1–5.3?
Quote:
Originally Posted by knc1 View Post
No change required to the directions, just use them as described.
I mean the extra commands from the webpage http://www.fabiszewski.net/kindle-terminal/
philip_goule is offline   Reply With Quote
Old 03-09-2018, 03:15 AM   #360
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by philip_goule View Post
I mean the extra commands from the webpage http://www.fabiszewski.net/kindle-terminal/
We can not channel into your mind and know what you are thinking.
We can only answer what you post here.

Which of the "extra commands" are you speaking of?
(See? We still can't channel into your mind, you have to write down what you are thinking.)
knc1 is offline   Reply With Quote
Reply

Tags
kindle touch, kindle touch hacks, terminal emulator

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
One more terminal emulator for kindle. Matan Kindle Developer's Corner 158 03-23-2020 06:45 PM
PRS-T1 Terminal Emulator in rupor-minimal jcromero Sony Reader Dev Corner 2 09-26-2012 02:07 PM
Anybody working on terminal for Kindle Touch? markatlnk Kindle Developer's Corner 3 06-02-2012 10:07 AM
Development Terminal Emulator oddity twichy enTourage Archive 5 05-01-2011 11:51 AM
DR800 rxvt (terminal emulator) for DR800 GregorRichards iRex 13 01-04-2011 06:56 AM


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


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