Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Secure Shell

Reply
 
Thread Tools Display Modes
  #1  
Old 05-17-2013, 02:20 PM
SimonHF SimonHF is offline
Registered User
 
Join Date: Sep 2005
Posts: 41
how to make securecrt behave like terminal WRT home, end, & shift-arrow

I'm running Ubuntu 12.10 and the regular terminal set the following if I type shift-left-arrow, shift-right-arrow, home, & end:

$ cat -v
^[[1;2D^[[1;2C^[OH^[OF

However, on SecureCRT -- after playing with the settings a lot -- then I get nothing for shift-left-arrow, and shift-right-arrow, and different codes for home and end:

$ cat -v
^[[1~^[[4~

Please don't say that I have to map all the keys manually somehow just to get SecureCRT doing the vanille terminal behavior :-(
Reply With Quote
  #2  
Old 05-17-2013, 03:32 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi Simon,

The Xterm emulation in SecureCRT 7.1 has Ctrl, Shift, etc. key mappings that send what is documented at the following location:
http://invisible-island.net/xterm/ctlseqs/ctlseqs.pdf
Do you get the arrow key behavior you want in SecureCRT 7.1 using the Xterm emulation?

If not, please let me know what you would prefer so I can create a feature request on your behalf.
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 05-21-2013, 11:19 AM
SimonHF SimonHF is offline
Registered User
 
Join Date: Sep 2005
Posts: 41
Thanks. I have version 6.7.5. Is this a reason to upgrade? Is it known to have been fixed in the 7.x version? Thanks, Simon
Reply With Quote
  #4  
Old 05-21-2013, 12:21 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi Simon,

Here is a line from the history file for SecureCRT 7.1:
  • Added support for sending Xterminal escape sequences for CTRL+<arrow> keys.
If you upgrade you will have access to this if you are using the Xterm emulation. If you don't, you have the option of mapping the keys.

You are welcome to evaluate SecureCRT 7.1 to see if it meets your needs.

Does this help to answer your question?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #5  
Old 05-21-2013, 12:50 PM
SimonHF SimonHF is offline
Registered User
 
Join Date: Sep 2005
Posts: 41
Thanks. With version 7.1 then the shift-arrow keys work but the home & end still differ:

$ cat -v
^[[1;2D^[[1;2C^[[1~^[[4~

Any ideas why or how to fix this?

Thanks,
Simon
Reply With Quote
  #6  
Old 05-21-2013, 04:17 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi Simon,

You will need to change these two keys manually if you would like to use something different that what is currently mapped.

I have run tests against a few different Linux OSes (including Ubuntu 13.04), and the Xterm keymapping that SecureCRT 7.1 works when pressing Home and End.

I do see that we send something different, but does what SecureCRT sends work?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #7  
Old 05-21-2013, 04:53 PM
SimonHF SimonHF is offline
Registered User
 
Join Date: Sep 2005
Posts: 41
If it worked then I wouldn't be spending time writing messages into this forum :-)

Basically, some software works with the default sequences for home and end from SecureCRT, and some software doesn't. I have been looking to see what the difference in the software is. It seems like software based on termcap works with the SecureCRT sequences for home & end. While software which is based upon the curses library needs the non-default sequences that I wrote about.

Further, I believe that if Vandyke changed the defaults -- to the same default sequences that vanille terminal uses -- then the software like vim would just continue to work, but more importantly the software that uses curses would also just work.

What are the steps to change those two keys manually?

I think I will also have to map further keys too. Interestingly, I noticed that shift-home and shift-end don't work in either SecureCRT or vanille terminal, but do work in vanille xterm:

$ cat -v
^[[1;2H^[[1;2F
Reply With Quote
  #8  
Old 05-22-2013, 09:53 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi Simon,

You can map keys in SecureCRT using the following steps:
  1. Press the Map a Key... button in the Terminal / Emulation / Mapped Keys category of the Session Options Dialog.
  2. Press the key/key combination to map.
  3. In the Action section of the Map Selected Key Dialog, select the function of the key combination from the Function dropdown menu.
  4. The option to the right will allow you to finish configuring the mapped key combination depending on the function chosen.
In this case you would use the Send String function and just type in the string to send.

You can make this change to the Default Session (and all existing sessions) using the information in a tip at the following location:
http://www.vandyke.com/support/tips/defaultset.html
Does this help you map the keys the way that you would like?

Additionally, if we ever do change the key mapping, we will post to this forum thread.

If you would like to be notified directly, please complete and submit the form at the following location:
Submit Feature Request
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730

Last edited by rtb; 05-22-2013 at 10:30 AM.
Reply With Quote
  #9  
Old 06-10-2013, 07:04 PM
Maureen's Avatar
Maureen Maureen is offline
VanDyke Product Director
 
Join Date: Feb 2004
Location: Albuquerque, NM
Posts: 1,563
Quote:
Originally Posted by SimonHF View Post
Thanks. With version 7.1 then the shift-arrow keys work but the home & end still differ:

$ cat -v
^[[1;2D^[[1;2C^[[1~^[[4~

Any ideas why or how to fix this?

Thanks,
Simon
Support for Esc[H and Esc[F for Home and End has been added to a pre-beta version of SecureCRT. If you would be interested in trying it, please send me email at Maureen.Jett@vandyke.com.

Maureen
Reply With Quote
  #10  
Old 01-28-2014, 02:28 AM
dehvokahn dehvokahn is offline
Registered User
 
Join Date: Jan 2014
Posts: 1
Still can't home or end

I am also having this problem.

I currently have version 6.7.x and home and end keys don't work at all. I tried to follow the instructions in this forum thread, but I cannot seem to find a list of the escape character codes to make home and end keys work.

I will likely switch back to putty or something else if I can't fix this. I really like secureCRT but without the use of proper home and end keys, I cannot function properly. I am using VIM all the time to edit massive amounts of code, and having to press and hold the arrow key to move hundreds of characters to the left or right in the line instead of using "home" or "end" is not only annoying but unacceptable and will determine whether or not I choose to keep this software.

I've been googling for at least 4 hours trying to find the right escape character code to add to the "Map Key" option, and haven't found anything for the home or end keys.

Further help is appreciated!

-D
Reply With Quote
  #11  
Old 01-28-2014, 10:56 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi dehvokahn,

Thanks for the question. You can map the Home and End keys to the following:
Home: \033[1~
End: \033[4~
Does this help?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #12  
Old 08-19-2014, 05:58 PM
SimonHF SimonHF is offline
Registered User
 
Join Date: Sep 2005
Posts: 41
I'm just evaluating SecureCRT for Mac. If I start a SecureCRT new local shell then ctrl-c does not seem to work. Other keys like opt-left-arrow, or command-left-arrow also do not move a word to the left and move home as expected. Why doesn't this work out of the box as expected (for example, ctrl-c and option-left work as expected using the regular terminal which comes with OS X...)? How can I configured it to work?

Last edited by SimonHF; 08-19-2014 at 06:03 PM.
Reply With Quote
  #13  
Old 08-20-2014, 11:34 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi SimonHF,

For a local shell connection, SecureCRT relies on the Default Session for the settings. You could edit the Default Session and add key mappings for the Opt+<Arrow Key> combinations.

Here are the instructions to map a key to send a string:
  1. Press the 'Map a Key...' button in the 'Terminal / Emulation / Mapped Keys' category of the Session Options - Default dialog.
  2. Press the key to map. In this instance press the Delete/Del key on your keyboard.
  3. Enter the string to send in the Send String inputbox.
Here are the mappings:
Opt+Left = "\033b"
Opt+Right = "\033f"
Opt+Up = "\033[A"
Opt+Down = "\033[B"
Does this work for you?

With regards to Ctrl+C, I did run some tests, and the running process is stopped as expected.

What behavior do you expect?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #14  
Old 08-20-2014, 12:46 PM
SimonHF SimonHF is offline
Registered User
 
Join Date: Sep 2005
Posts: 41
For me, then ctrl-c does not behave as usual. I can reproduce by following these instructions:
* Start securecrt.
* Click File, Connect Local Shell.
* Type "echo hello" without pressing return.
* Press ctrl-c. But nothing happens...

...the cursor stays flashing at the end of "hello". I can continue typing " world" and press return and echo behaves as expected :-( Surely this is incorrect behaviour, or? In fact, I have no way to stop the current command using securecrt mac. It's a fresh install and I have not messed with an setting. In fact, it's a fresh Macbook Pro too.

FYI ctrl-c still works just fine in the regular terminal, i.e. after type "echo hello" then I can press ctrl-c to cancel the command before it runs as expected.

The session option, emulator defaults to VT100 even though it's the local shell. Is this correct? Seems like an unlikely setting, or? If I change it to Linux then the screen turns black. But the behaviour of ctrl-c does not change. Same thing if I change it to xterm...

Please help!
Reply With Quote
  #15  
Old 08-20-2014, 01:31 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi SimonHF,

If I use your steps, pressing "control"+C will result in a new prompt. The behavior is the same in SecureCRT and Terminal.

What is your shell (echo $SHELL) in SecureCRT and Terminal?

If you map a button simulate "control"+C, do you get different results?

Here are the instructions to map a button on the Button Bar to send a break:
  1. Right-click on a blank space on the Button Bar.
  2. Select "Telnet Function" from the Function menu.
  3. The dropdown menu to the right will become 'Telnet Function'. Select "TN_BREAK".
  4. Provide a label.
I would not recommend using the Linux emulation unless you have a specific reason. If you don't want to use VT100 (and I understand if that is the case), I would recommend using Xterm.
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 06:42 AM.