In PuTTY my home and end keys work properly on a Linux SSH Bash session. In TeSSH 2.33 they don't appear to do anything. I note that there are options for controlling how these work in PuTTY but I simply have it on Standard (the default).

I'll need someone to post a link to a page that describes what these keys are supposed to send to the server. Since these keys are not part of the ANSI standard, I have no idea what codes I'm supposed to send for them.

It really isn't too clear in the guide which are codes from the server, and which are codes from the terminal; and requires some interpretation. Scanning down to the "cursor positioning" will give you appropiate codes to send for Home and End.

_________________The only good questions are the ones we have never answered before.
Search the Forums

I think PuTTY actually has a low-level log file that I can also look at to figure out what it is sending. Thanks for the links!

zMUD/CMUD/TeSSH already sends the VT102 codes for these keys as far as I can tell, so my guess is that PuTTY is sending something else.

Btw, Seb, you should also check your server shell after you log in with TeSSH and make sure that it recognizes that you are using a VT100 terminal. One of the CMUDPro SSH testers was running into problems with terminal types for some reason. So there might be some bug where the server isn't detecting the terminal type properly.

I know that with *nix, it's not a matter of sending a single code for a key on the keyboard...it depends upon the terminal emulation mode. In VT100 mode a key might send something different than when in "xterm" mode, for example.

I think for TeSSH you probably should make some base packages like "VT100" "VT220" "Linux" etc etc and have them load based on a terminal type drop down in the session list (not sure if there is one yet or not).

PuTTY has a whole page on different keyboard options that you can select, I imagine you don't want to hardcode those options, it'd be better to do them as packages?

I expect the answer to be "No", but do you plan to support IBM emulation (eg 5250 for the AS/400, etc). It's quite a bunch different to the more standard ANSI/VT type emulations.

OK, thanks for the info on that. By checking the terminal type, I meant that you need to type some command on your remote server to see what your shell thinks the terminal is set to. In other words, don't just check the TeSSH Preferences screen, but try to find out what the server really thinks your shell terminal is set to.

If Home/End are not sending anything, then that's definitely a bug. My guess is that they are not getting intercepted in my keyboard hook routine and are getting eaten by Windows somehow.

Edited: And *NO* plans for any IBM emulation, sorry. I'm *Really* trying not to get distracted with TeSSH here. My main product is CMUD and I just don't have time for stuff like IBM emulation. Only if more people start buying TeSSH. Like RainChild, I'm not sure about the business viability of the Telnet/SSH market yet, and I'm not going to make another "zApp mistake" and put months of work into something that nobody buys.

By checking the terminal type, I meant that you need to type some command on your remote server to see what your shell thinks the terminal is set to. In other words, don't just check the TeSSH Preferences screen, but try to find out what the server really thinks your shell terminal is set to.

Well, I think this is just using what TeSSH is set to, but in my remote Bash shell over SSH:

Code:

[root@IVRA3 ~]# set | grep TERM
TERM=vt100

I tried changing my Terminal Type in TeSSH to cmud and various others, but it gets reset to vt100 every time I reconnect. I even tried changing the default instead of the package, but that didn't help, although the default package does look to have changed. It looks like Terminal Type isn't being saved for the current package. It neither changes on the server, nor in CMUD after a reconnect. That is it does change if I go back in and check in Preferences, even after disconnecting, but gets reset when I reconnect. And since Terminal Type is probably only sent during a connect...

Are you setting the terminal type in the main Session preference page, or are you setting it in the SSH preferences? Seems like there was an additional terminal type in the SSH preferences and I don't remember why it's there or how it is related to the regular session terminal type, but I'll look into it. There was an old bug where it was forcing VT100 mode for SSH sessions, but I thought I had fixed that.

The Terminal Type in the Session preferences is sent whenever the server performs a Telnet Terminal Type option request. So it is up to the server itself to request the terminal type. The Terminal stuff in the SSH Preferences set properties of the SSH Shell component (3rd party) that I am using and there are lots of other shell properties that can be set there, but I don't know exactly how they are used with SSH.

I found out what PuTTY is sending. Turns out that xterm added some codes for various keys that VT100 didn't support. I added these keys for HOME/END and also for the F1..F12 keys. This is added in v2.34.

OK, how about the Page Up and Page Down keys now (in character mode)? They are currently handled locally to scroll the window. Shift-PageUp, Shift-PageDown and Ctrl-PageDown don't seem to do anything and Ctrl-PageUp seems to go to the top of the scrollback buffer. Compare this with PuTTY where PageUp and PageDown are sent to the SSH server, Shift-PageUp and Shift-PageDown scroll the window by pages and Ctrl-PageUp and Ctrl-PageDown appear to go up one line or down one line in the scrollback buffer.

This is an important feature as without PageUp and PageDown working properly it might be tricky or impossible to use certain features of certain apps, or at least rather tedious to navigate files or help pages (like in vim).

Can you find me the links to show what codes are sent for the PgUp/Down keys? I couldn't actually get the PuTTY log to show me anything...I did the Home/End keys because PuTTY tells you what they send in the Preferences setup. But it didn't mention what was sent for PgUp/Down. Or maybe I'll check the xterm protocol since it seems that all of these keys are part of the xterm emulation that PuTTY is doing (since the VT100 didn't have any of these keys).

The Ctrl-Arrow (or maybe Shift-Arrow) keys scroll line by line, so I don't plan to change that. But having an option to switch the Pageup vs Shift-Pageup might be a good idea.

PageUp and PageDown correspond to beginning-of-history and end-of-history as you can see if you use them in bash - they work on your command history. The Delete key is nice too, plus Ctrl-Left and Ctrl-Right for moving around quicker. I didn't know what "quoted-insert" meant, but from my first link above:

Quote:

"quoted-insert" which outputs the actual value of a key, rather than issuing the keypress. quoted-insert is typically "Ctrl-v".

So in PuTTY, doing Ctrl-v Ctrl-Left displays "^[OD" - the same as my second quote. Useful for seeing what PuTTY is doing quickly! PageUp and PageDown are covered by my first quote and I checked them using Ctrl-v.

I had the same problem with my domains. I ended up setting up an Email Server that has gray-listing. That helped immensely. I'm on Windows servers, but I know that this feature started on Linux servers and migrated to other operating systems. It went from around 10K spams a month to only about 7-10 a month.

Rainchild, I got your file. I'll take a look at it after WorldCon next week. Thanks!

Our email system uses a combination of Spam Assassin and something called Barracuda (which is a gray-list kind of service that updates regularly). We've gone from about 3000 spam a day down to about 5 a day.

I've been working on this in the next beta version (3.04) which will also have a TeSSH release.

I have fixed the PageUp/PageDown keys so that they properly send the xterm ESC codes whenever you are in "Keypad" mode (like within the vi editor). I am also considering adding a "Keys" preference page where you will be able to specify which keys send which codes in which modes.

For example, you'll be able to set Ctrl-V to execute the Paste menu command when at the command line, but send a Ctrl-V character when in keypad mode.

I have also changed the default terminal type for TeSSH from VT100 to XTerm since only XTerm supports other keys like PgUp/PgDn. Working great now in VI on v3.04.