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-23-2011, 08:14 PM   #1
Matan
Enthusiast
Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'
 
Posts: 42
Karma: 39432
Join Date: May 2011
Device: none
One more terminal emulator for kindle.

I worked a little on kiterm and produced a version that works alongside launchpad, instead of replacing it. This file can be installed by using launchpad installation (copy to /mnt/us/customupdates and press shift shift I), or directly by unzipping under /mnt/us.

Source code is at: http://my.svgalib.org/kindle/myts-6.tar.gz

Changes compared to lrizzo's kiterm (and to modifications by Xqtftqx, PoP, dsmid):
  1. Does not replace launchpad, but uses already installed launchpad.
  2. Does not have http server functionality.
  3. Full screen.
  4. Character encoding and font not compiled in.
  5. Font sizes configurable.
  6. Supports UTF8 as well as 8 bit encodings.
  7. Scroll back buffer.
  8. Minor bugfixes
    • Line wrapping support.
    • A few more control sequences.
    • Odd width fonts supported.


After installing, the default launchpad configuration (in the file /mnt/us/launchpad/myts.l.ini) is:
T T = start (or return to) terminal 1
T Y = start (or return to) terminal 2
T U = start (or return to) terminal 3
T A = kill myts

To display the keyboard mapping press any modifier (shift, menu, back, aA) and exit button (by default Left<).

Code:
Menu:
F1 F2 F3 F4 F5 F6 F7 F8 F9  F10
`  %  ^  <  >  [  ]  =  F11 F12
\t  ;  ,  (  )  {  }
   
   
Back:

!  @  #  $  %  ^  &  *  (  )
'  +  #  -  _  (  )  &  !  ?
~  $  |  /  \  "  '  :
The symbols produced by Back key are configurable.

Fonts use "hex" format. A perl script is included that converts bdf fonts to hex. Since the fonts do not include width/height information, this must be provided in the configuration file (/mnt/us/myts/myts.ini). Fonts of width at most 8 may be used.

An encoding file is simply a 512 bytes binary file where the nth 16 bit word is the unicode value of char n. A script to generate such files is included.

To enable the scroll back buffer, use the configuration file option ScrollbackLines to set the number of lines saved in the buffer. A value of 0 (default) disables scroll back. I the default configuration file, the right page scrolling keys are used for scrollback, but this is configurable.
Attached Files
File Type: zip myts-8.zip (129.3 KB, 4432 views)

Last edited by twobob; 03-28-2013 at 04:13 PM. Reason: revision 8
Matan is offline   Reply With Quote
Old 10-23-2011, 09:22 PM   #2
Xqtftqx
Enthusiast
Xqtftqx doesn't litterXqtftqx doesn't litterXqtftqx doesn't litter
 
Posts: 31
Karma: 246
Join Date: Mar 2011
Device: Kindle 3G
Great work! I haven't had time to try it out but it looks very nice!
Xqtftqx is offline   Reply With Quote
Advert
Old 10-24-2011, 04:40 AM   #3
dsmid
Linux devotee
dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.
 
dsmid's Avatar
 
Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
Very nice, Matan. It's almost perfect.
I miss one feature though.
I always keep forgetting the keyboard mapping and it would be great to be able to quickly toggle displaying current mapping with a key stroke.
dsmid is offline   Reply With Quote
Old 10-24-2011, 06:34 AM   #4
dasmoover
Connoisseur
dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.
 
Posts: 84
Karma: 26720
Join Date: Mar 2011
Device: Kindle 3 WIFI
@dsmid echo "cat /mnt/us/myts/printkeys.txt" >> /usr/bin/printkeys
then write the keymap to the text file.

@OP, awesome work man, kiterm stopped working today and this works beautifully. Would you be able to add ctrl modifier support?
dasmoover is offline   Reply With Quote
Old 10-24-2011, 07:30 AM   #5
wiccan2
Connoisseur
wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'
 
wiccan2's Avatar
 
Posts: 57
Karma: 10288
Join Date: Aug 2011
Location: West Sussex
Device: Kindle 3 - 3g, Samsung Galaxy Note
This looks like it will be great, will try it out later after work.

Does this version still support tab through back + a. I found this very useful in the full screen version of he previous terminal emulator as it allows you to use tab complete for commands.

My kindle is in need of some clean up on the side of terminal emulators and opt ware. At least I now have an excuse to switch to launchpad and clean up my root partition.
wiccan2 is offline   Reply With Quote
Advert
Old 10-24-2011, 08:33 AM   #6
Matan
Enthusiast
Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'
 
Posts: 42
Karma: 39432
Join Date: May 2011
Device: none
aA key is ctrl (configurable). This did not change from kiterm

Tab is Menu+z. (listed as \t in the keymap).

For file name completion in shell you can use ctrl+i when Tab is not available.
Matan is offline   Reply With Quote
Old 10-24-2011, 09:39 AM   #7
dsmid
Linux devotee
dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.
 
dsmid's Avatar
 
Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
Quote:
Originally Posted by dasmoover View Post
@dsmid echo "cat /mnt/us/myts/printkeys.txt" >> /usr/bin/printkeys
then write the keymap to the text file.
Good idea, it doesn't have to be /usr/bin/, I'd rather use /mnt/us/ as I have it in my PATH anyway.
When I think about it, it doesn't have to be a script, an alias seems to be more suitable.
It's still more a workaround then a solution. Often you need to display the mapping after typing long command. Maybe I could dedicate one terminal instance for displaying help.

Last edited by dsmid; 10-24-2011 at 09:42 AM.
dsmid is offline   Reply With Quote
Old 10-24-2011, 01:27 PM   #8
Matan
Enthusiast
Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'
 
Posts: 42
Karma: 39432
Join Date: May 2011
Device: none
I update first post with new version, which includes keymap display screen (modifier+exit button) this screen is displayed while the key is pressed.

I have three test cases and they all have issues:

top - at exit it does not scroll, so the shell prompt displays on the last line of top.

htop - when a program with a short name is printed on a line where a program with a long name was, the remaining letters are displayed.

alpine - the keyboard command lines are not displayed on the bottom two rows, but one row above.

I do not even know if the problems come from line wrapping issues, unhandled escape sequence or a mishandled escape sequence. If anyone has an idea, or a simpler test case,
Matan is offline   Reply With Quote
Old 10-24-2011, 03:24 PM   #9
danik
Member
danik began at the beginning.
 
Posts: 12
Karma: 14
Join Date: Sep 2011
Device: Kindle3 3G
It's awesome! With this terminal the USBNetworking becomes (nearly) redundant! Great work!
danik is offline   Reply With Quote
Old 10-25-2011, 01:31 AM   #10
dsmid
Linux devotee
dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.
 
dsmid's Avatar
 
Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
Perfect !
Thanks a lot.

Just a side note: The F-keys on the help screen are zero-based and hexadecimal
e.g. F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB
dsmid is offline   Reply With Quote
Old 10-26-2011, 08:25 AM   #11
Matan
Enthusiast
Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'
 
Posts: 42
Karma: 39432
Join Date: May 2011
Device: none
First post updated with revision 5:

More escape sequences (scroll down, origin mode). Now top, htop and alpine appear to work without display glitches.

F numbers in keymap display fixed.
Matan is offline   Reply With Quote
Old 10-26-2011, 09:47 PM   #12
PoP
 curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 3,007
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
Thanks Matan. I am convinced and I have now switched to original launchpad + your version 5 of myts.

Echoing Dsmid, I miss one feature too. I also always keep forgetting the keyboard mapping and since you have plenty of room to expand, I would like the Menu+Left< recently added help screen, to display in some way, more information.

Completing the help, these additional mappings:
ESC --- Left>
CTRL --- Aa
1 to 0 --- Alt+q to Alt+p
UP, DOWN, LEFT, RIGHT --- Fw_Up, Fw_Down, Fw_Left, Fw_Right
PgUP, PgDown --- Shift+Fw_Up, Shift_Fw_Down
Home, End --- Home, Shift+Home
Back --- left symbol on help screen
Menu --- right symbol on help screen

Applying some corrections:
The F10, F11 and F12 are still displayed as FA, FB, FC on the help screen
The right tab, left tab --- back+z, shift+back+z are not obvious and currently show as an invalid character (white on black question mark) maybe would it be more explicit if depicted as => and <=.

Did I forget any other key modifier sequence?

Thanks anyway. This is a great update.
PoP is offline   Reply With Quote
Old 10-28-2011, 05:09 AM   #13
Matan
Enthusiast
Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'
 
Posts: 42
Karma: 39432
Join Date: May 2011
Device: none
Another revision. Two main things:

1. Scroll back buffer. See myts.ini for details.

2. Two new escape sequences supported.
Matan is offline   Reply With Quote
Old 10-29-2011, 08:02 AM   #14
Kindlevarazs
Connoisseur
Kindlevarazs ought to be getting tired of karma fortunes by now.Kindlevarazs ought to be getting tired of karma fortunes by now.Kindlevarazs ought to be getting tired of karma fortunes by now.Kindlevarazs ought to be getting tired of karma fortunes by now.Kindlevarazs ought to be getting tired of karma fortunes by now.Kindlevarazs ought to be getting tired of karma fortunes by now.Kindlevarazs ought to be getting tired of karma fortunes by now.Kindlevarazs ought to be getting tired of karma fortunes by now.Kindlevarazs ought to be getting tired of karma fortunes by now.Kindlevarazs ought to be getting tired of karma fortunes by now.Kindlevarazs ought to be getting tired of karma fortunes by now.
 
Posts: 60
Karma: 494362
Join Date: Nov 2010
Location: Budapest, Hungary
Device: Kindle 3
Could anyone send a screenshot of this emulator?
Kindlevarazs is offline   Reply With Quote
Old 11-13-2011, 11:09 AM   #15
dpavlin
Connoisseur
dpavlin can really shake a tail feather.dpavlin can really shake a tail feather.dpavlin can really shake a tail feather.dpavlin can really shake a tail feather.dpavlin can really shake a tail feather.dpavlin can really shake a tail feather.dpavlin can really shake a tail feather.dpavlin can really shake a tail feather.dpavlin can really shake a tail feather.dpavlin can really shake a tail feather.dpavlin can really shake a tail feather.
 
dpavlin's Avatar
 
Posts: 61
Karma: 116628
Join Date: May 2011
Location: Zagreb, Croatia
Device: Kindle K3G and DXG
Running on DXG requires keydefs.ini changes

Following changes introduced into keydefs.ini before [inkeys-dx] makes this very useful full-screen terminal working on DXG nicely, thanks Matan for your work!

Quote:
; DX - dpavlin
53 = /
90 = Aa
94 = Sym
98 = Home
109 = Left< ; so we can exit!
124 = Left>
91 = Back

;f105 = Left
;f106 = Right
f122 = Up
f123 = Down
f92 = Select

114 = Vol-
115 = Vol+

; DXG doesn't have Left< for exit!
[Settings]
TermEnd = Home
It's important to insert those changes as late as possible in keydefs.ini so they are evaluated last.

Reading man pages will never be same again :-)

Last edited by dpavlin; 11-15-2011 at 01:48 PM. Reason: put changes last in keydefs.ini
dpavlin 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
Kindle Terminal app (sort of) lrizzo Kindle Developer's Corner 58 09-16-2023 03:59 PM
Kindle 1 Terminal? sinkillerj Kindle Developer's Corner 0 05-19-2011 12:17 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
Terminal Application For Kindle DX Nathan Campos Kindle Developer's Corner 1 11-09-2010 04:53 PM


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


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