Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

Reply
 
Thread Tools Display Modes
  #1  
Old 07-11-2018, 07:15 AM
azazello azazello is offline
Registered User
 
Join Date: Feb 2017
Posts: 6
How to send key combinations 'Ctrl+PgUp' and 'Ctrl+PgDown'?

Hi!

The initial conditions:
SecureCRT version is 7.1.3 (x64 build 378).
Terminal emulation is 'Linux'.
Server with the Midnight Commander (MC) file manager.

When I work with my server locally, I use MC and I use the key combinations 'Ctrl+PgUp' to exit from directories and 'Ctrl+PgDown' to enter into directories. But, if I connect to the server remotely via the SSH channel, I can't use these key combinations, because SecureCRT uses them to scroll text in the terminal window.

How to configure SecureCRT so that it sends these key combinations to the server?
Reply With Quote
  #2  
Old 07-11-2018, 09:05 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,611
Hi azazello,

If you know what data is sent by this hotkey, you can remap it in SecureCRT. In my tests, it appears it is ^[[5;5~ and ^[[6;5~ (where the
^[ represents ESC, or \033 when mapping in SecureCRT). That info was discovered by following the tips in the SecureCRT Help topic Configuring the Keyboard / Determine Escape Sequence Key Codes (ie: using the "cat -ve" mechanism).

See attachment. The Terminal / Emulation / Mapped Keys category is in Session Options. Now when I use that key combo when in MC, I get the desired behavior of paging through the file manager.
You can employ the power of editing the Default session to make these changes to all of your existing and future sessions. Here are some links to tips and a video that provide more details about using the Default session to make mass changes to multiple sessions:
https://www.vandyke.com/support/tips/defaultset.html
https://www.vandyke.com/support/tips/multisessions.html
https://www.youtube.com/watch?v=5RbuZn9L48g
Note: In order for a "change" to be applied to all other sessions, the Default session's option/field you're targeting must actually be modified/different from its current value. This means that if the targeted field you want to apply to all other sessions is *already* set to the value you want, you must first change it to something *different* (and apply that "change") and then edit the Default session again to set the option to its *desired* value (and apply that "change").

Since you would be making a change that affects many sessions, the recommendation is to backup your config as a best practice.
Attached Images
File Type: png ForumAzazello.png (15.7 KB, 52 views)
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 07-12-2018, 02:52 AM
azazello azazello is offline
Registered User
 
Join Date: Feb 2017
Posts: 6
Hi bgagnon,

I tried the method you suggested - unfortunately it did not help to solve my problem. When I start 'cat -ve' locally on the server and press 'Ctrl+PgUp', I see the string "^[[5~". But I see exactly the same string if I press 'PgUp' or 'Alt-PgUp'! Therefore, when I remap the 'Ctrl+PgUp' key combination to transmit the string "^[[5~", the MC responds as if I pressed 'PgUp'. I don't know why MC normally handles different key combinations locally. Probably at local work with MC it takes key codes not from a stream stdin.

In any case - thank you for the advice! I will try to solve this problem in another way.
Reply With Quote
  #4  
Old 07-12-2018, 09:33 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,611
Hi azazello,

What's the remote OS?

The ";5" part must be the difference because I just rechecked my results (on CentOS 6.2) and I do get the expected behavior and for me the data sent by "Ctrl+PgUp" is different from "PgUp".
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #5  
Old 07-12-2018, 10:01 AM
azazello azazello is offline
Registered User
 
Join Date: Feb 2017
Posts: 6
Hi bgagnon,

On my server is installed Debian 9 Stretch.
I just checked on another server with Debian 7 Wheezy, deployed to a virtual machine - the behavior is exactly the same.

The whole block of six keys behaves like this:

Insert, Alt+Insert, Ctrl+Insert: ^[[2~
Delete, Alt+Delete, Ctrl+Delete: ^[[3~
Home, Alt+Home, Ctrl+Home: ^[[1~
End, Alt+End, Ctrl+End: ^[[4~
PageUp, Alt+PageUp, Ctrl+PageUp: ^[[5~
PageDown, Alt+PageDown, Ctrl+PageDown: ^[[6~
Attached Images
File Type: gif Debian7vm.gif (13.3 KB, 68 views)
Reply With Quote
  #6  
Old 07-12-2018, 10:38 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,611
Hi azazello,

Are you *in* MC when you run the cat -ve test?

What you see at shell will likely differ from what you see from inside the app.

Also, would you try changing the emulation in SecureCRT to Xterm (from Linux). Linux as an emulation in SecureCRT is designed to emulate the Linux *console*, which is different from what you get in a GUI/X environment. If connecting to Linux remotes, you should be using Xterm emulation. It's what the built-in Terminal application uses. Note that an emulation change requires a disconnect/reconnect.
__________________
Thanks,
--Brenda

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

Last edited by bgagnon; 07-12-2018 at 10:43 AM. Reason: Additional request
Reply With Quote
  #7  
Old 07-12-2018, 12:08 PM
azazello azazello is offline
Registered User
 
Join Date: Feb 2017
Posts: 6
No. I wasn't in MC when I ran 'cat -ve'. This can be seen from the attached screenshot: I launched 'cat -ve' right after the OS boot.

I will experiment with terminal emulation tomorrow. Now we have night.
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 08:51 AM.