Mobileread
K3 One more terminal emulator for kindle.
#1  Matan 10-23-2011, 08:14 PM
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.
[zip] myts-8.zip (129.3 KB, 1116 views)
Reply 

#2  Xqtftqx 10-23-2011, 09:22 PM
Great work! I haven't had time to try it out but it looks very nice!
Reply 

#3  dsmid 10-24-2011, 04:40 AM
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.
Reply 

#4  dasmoover 10-24-2011, 06:34 AM
@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?
Reply 

#5  wiccan2 10-24-2011, 07:30 AM
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.
Reply 

#6  Matan 10-24-2011, 08:33 AM
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.
Reply 

#7  dsmid 10-24-2011, 09:39 AM
Quote dasmoover
@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.
Reply 

#8  Matan 10-24-2011, 01:27 PM
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,
Reply 

#9  danik 10-24-2011, 03:24 PM
It's awesome! With this terminal the USBNetworking becomes (nearly) redundant! Great work!
Reply 

#10  dsmid 10-25-2011, 01:31 AM
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
Reply 

  Next »  Last »  (1/15)
Today's Posts | Search this Thread | Login | Register