![]() |
#1 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 23
Karma: 22222
Join Date: Oct 2010
Device: kindle3
|
merged terminal/launchpad/web server
[updated 06-dec]
At http://info.iet.unipi.it/~luigi/kind...indle-terminal you can find a standalone application that merges launchpad https://www.mobileread.com/forums/showthread.php?t=97636 and my former ajaxterm code (and a web server), implementing the ideas described in https://www.mobileread.com/forums/sho...7&postcount=26 At this stage the code is experimental and meant for developers only. Extract the archive, look at the source and possibly rebuild it to make sure you don't have surprises (there is a precompiled binary if you trust it). Copy myts.arm and the two .ini files in a directory on the kindle and manually start the program in background. The program acts as "launchpad". In particular, the "Shift"-t sequence enters terminal mode, from which you can exit pressing "Left<" (the "Page Back" key in the upper left). Keys act as their label, you can remap Esc, Ctrl and SYM to generate symbols not on the keyboard. Right now ESC is the "Left>" key, "Aa" acts as CTRL, and "Back" and shift can be used to generate characters not on alphanumeric keys. More details in the README file with the archive. Right now the terminal uses a CP-437 font of size 8x16 from FreeBSD, which allows you to see 75 chars in vertical mode. ANSI emulation is almost complete though a few issues remain with autowrap mode and colors. Also, the KindleDX keys might need some tweaks -- see keydefs.ini Restart on a signal is known not to work. Last edited by lrizzo; 12-06-2010 at 04:14 AM. |
![]() |
![]() |
![]() |
#2 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 121
Karma: 82565
Join Date: Aug 2010
Location: Maryland, USA
Device: dxg, k3w,k4nt,kpw
|
it is not clear if you are still using the browser/javascript.
If so, why can't your application simply talk to the telnet daemon which comes with usbNetwork package? A practical alternative for that may be mimicking the code from telnetd which establishes a link to system shell. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 23
Karma: 22222
Join Date: Oct 2010
Device: kindle3
|
Quote:
It is trivial to disable the http server part if one does not want it. i just included it in the package as the code that does the virtual screen emulation is the same used in the ajaxterm clone. There is no point in talking to the telnet daemon when you can talk directly to the pseudo-tty (see function term_new() in terminal.c). The telnet daemon gives you nothing more than that, and instead adds another layer of encoding on the input and output streams. cheers luigi Last edited by lrizzo; 12-02-2010 at 09:56 AM. |
|
![]() |
![]() |
![]() |
#4 |
Hobbit
![]() Posts: 20
Karma: 10
Join Date: Jan 2007
Location: Shizuoka, Japan
Device: k2i
|
Awesome work! i finally managed to get it working on my K2i.
But I'm having trouble understanding the keyboard mapping. How can I get the : key so I can escape VI? Thanks, Jeffrey |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,452
Karma: 10484861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
|
Great job.
You are featured on hackaday.com http://hackaday.com/2010/12/10/kindl...ss-activation/ Congratulations. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Addict
![]() ![]() ![]() ![]() ![]() Posts: 219
Karma: 404
Join Date: Nov 2010
Device: Kindle 3G, Samsung SIII
|
The same problem here as JDShaffer had - the mapping of most special characters does not work. Only the Sym (physical Back) mapping works ( so I can type eg [] but not {} or () ). This is on Kindle3. I might have a closer look at the code later on...
|
![]() |
![]() |
![]() |
#7 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,007
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
I press simulataneously the symbol key, the shift key and the k key (BackShiftK) to get the : I then type q! and press the enter key to exit vi. I also "export TERM=vt220" prior to invoking vi.
|
![]() |
![]() |
![]() |
#8 | |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,007
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Quote:
You can enter all symbols by pressing simultaneously the following keys to position you in their respective quadrant: On the top row, ALt+Shift+Letter Shift+Back+Letter Alt+Letter Back+Letter On the other two rows, Shift+Letter Shift+Back+Letter Letter Back+Letter Hope this helps. |
|
![]() |
![]() |
![]() |
#9 | |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,007
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Quote:
Whenever I enter an invalid hotkey (e.g. not present in the launchpad.ini file) the launchpad program reports the unknown sequence (see 3rd line in my console log below) but stops interpreting any further hotkey. The web server part still works at that point but I anyway have to kill and restart myts.arm manualy for the launchpad part to start reinterpreting hotkeys. Am I missing something. 74461.071 [execute_action 711] start terminal 1 got 0x4b160 74463.361 [curterm_end 822] exit from terminal mode 74476.161 [call_hotkey 809] Unknown hotkey sequence entered len 1: |
|
![]() |
![]() |
![]() |
#10 |
Addict
![]() ![]() ![]() ![]() ![]() Posts: 219
Karma: 404
Join Date: Nov 2010
Device: Kindle 3G, Samsung SIII
|
I get it know - it works. Thanks, PoP!
|
![]() |
![]() |
![]() |
#11 | |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 23
Karma: 22222
Join Date: Oct 2010
Device: kindle3
|
Quote:
the bug in detail. Your analysis is very interesting, let me try to replicate the bug and see if we can fix it. thanks luigi |
|
![]() |
![]() |
![]() |
#12 | |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,007
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Quote:
|
|
![]() |
![]() |
![]() |
#13 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Feb 2011
Device: kindle 3
|
hi,thanks for your great job.
i came across a problem:when i press <Alt>+<Shift>+u,in order to input &,and the screan came out &*,two symbols. and i press <Alt>+<Shift>+i,the result is &*,too. any solution? |
![]() |
![]() |
![]() |
#14 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,007
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
I concur. Till the bug gets fixed my bypass solution would be to generate the two symbols &* and DELete the one we don't intend.
|
![]() |
![]() |
![]() |
#15 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 121
Karma: 82565
Join Date: Aug 2010
Location: Maryland, USA
Device: dxg, k3w,k4nt,kpw
|
unfortunately, that's not a software bug, but a design flaw.
The "Alt" keyboard key behaves in a special way. While all other keys generate usual linux "press" and "release" input message, this key doesn't generate anything when used alone. If used in a combination with the most other keys -- doesn't matter sequentially or simultaneously -- four input events are generated:
But, the upper row keys, i.e. QWERTYUIOP combined with the "Alt" do non produce Alt/ event sequences like shown above, they simulate numbers instead. For example, pressing and releasing Alt/Q causes the following input messages to be generated:
So, by design it is not possible to enter the Alt/Q .. Alt/P sequences from the Kindle keyboard. This is true at least for K3W and KDXG models. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PHP+Apache web server for calibre ... | chaley | Related Tools | 254 | 04-28-2014 08:18 PM |
Running Calibre on Terminal Server | JeffAlan66 | Calibre | 2 | 08-12-2010 02:00 PM |
Web Content Server | mezme | Calibre | 7 | 01-08-2010 09:59 PM |
Calibre - web server problems | eclpmb | Calibre | 9 | 11-28-2008 02:04 PM |