Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 08-25-2014, 12:30 PM
N4pkins N4pkins is offline
Registered User
 
Join Date: Aug 2014
Posts: 6
Unable to map F1-F4 to raw keystrokes

I need to be able to map F1-F4 to their raw keystroke values.

They're, by default, mapped to PF1-PF4, and there is not option in the VT dropdown to map them to their raw keystroke values that I'm able to see.

Is it possible to map these keys to their own values in SecureCRT?
Reply With Quote
  #2  
Old 08-25-2014, 01:17 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi N4pkins,

Thanks for the post. I am not sure what you mean by raw keystroke values, but you can map a key to send a string.

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 dialog.
  2. Press the key to map.
  3. Enter the string to send in the Send String inputbox.
Does this work for you?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 08-25-2014, 01:35 PM
N4pkins N4pkins is offline
Registered User
 
Join Date: Aug 2014
Posts: 6
I'm somewhat new to terminal usage, so I'll use an unnamed alternative terminal to illustrate my point.

In TerminalPlus, I'm able to map my F1-F4, or I can map them to what I believe is the virtual terminal mapping for these keys commonly represented as PF1-PF4.

In order to access pieces of functionality, I need access to F1-F4 as their default keyboard values, as opposed to PF1-PF4.

If you see in the Keyboard Mapping screen for SecureCRT you have the default mapping for F1-F4 set at "VT_PF<1,2,3,4>", and when you scroll down in the dropdown you can see that there are mappings for F6+ in the form of "VT_F6" as opposed to "VT_PF6".

With this context in mind, my question is how can I map F1-F4 keys to "VT_F<1,2,3,4>"?


I hope that was clear, thank you for the prompt reply.
Reply With Quote
  #4  
Old 08-25-2014, 03:34 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi N4pkins,

Historically, function keys were referred to as "[P]rogram [F]unction" keys, hence VT_PF<#>.

You can use the information in my previous post to map a key to send what you want to the remote device to which you are connecting.

Does this help to clarify?

I don't know that a function key has a default value outside of the emulation you are using.

What do you consider to be the default value for F1 - F4?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #5  
Old 08-26-2014, 06:56 AM
N4pkins N4pkins is offline
Registered User
 
Join Date: Aug 2014
Posts: 6
The default value for F1-F4 in the context of the SecureCRT mapping would be VT_F1, VT_F2, etc. This mapping starts at F6 with VT_F6, but I'm not able to find any of these mapping for F1-F4, just the VT_PF1 that you referred to.
Reply With Quote
  #6  
Old 08-26-2014, 12:25 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi N4pkins,

Function keys are emulation or application context sensitive. There is no "raw keystroke value" for a function key.

You mentioned previously that you are using another terminal emulator.

What terminal emulator are you using successfully?

What emulation is that terminal emulator configured to use?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #7  
Old 08-27-2014, 07:23 AM
N4pkins N4pkins is offline
Registered User
 
Join Date: Aug 2014
Posts: 6
I'm currently using PowerTerm.

I can successfully map my F1 key to the F1 function. I can also map the F1 key to the PF1 function.

This is something I haven't been able to do in SecureCRT.

I have to be using the wrong terminology.
Reply With Quote
  #8  
Old 08-27-2014, 11:25 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi N4pkins,

I was hoping that knowing the terminal emulator might help me help you, but I can't find an obvious way to configure PowerTerm to map a key to send the string you are sending.

You may consider contacting your PowerTerm vendor to get assistance in determining what PowerTerm is sending when you press F1.

It is also possible to determine what a key is sending by connecting to your favorite UNIX machine using a shell connection. Once you have established a shell connection, at the prompt you would type "cat -v" without the quotes and press Enter. This will allow you to see the string that a terminal emulator is sending to the shell when a key is pressed.

Once you know the string, you are welcome to post it and I will see what I can do to help you convert it to a string that SecureCRT can use.
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #9  
Old 08-28-2014, 09:56 AM
N4pkins N4pkins is offline
Registered User
 
Join Date: Aug 2014
Posts: 6
When I press F1-F4 in PowerTerm I get "^[[11~", "^[[12~", "^[[13~", "^[[14~" respectively.

When I map F1-F4 to PF1-PF4 I get the following respectively: "^[OP", "^[OQ", "^[OR", "^[OS".

Are these values something I can map to these keys as Send as String and achieve desired function(I don't want the keys to send a literal string).

I hope this helps.
Reply With Quote
  #10  
Old 08-28-2014, 12:22 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi N4pkins,

Thanks for the information. While you will be using the Send String option when mapping a key, the string will not be sent literally.

There is a common element to each string that PowerTerm is sending. It is "^[". This is commonly referred to as an escape character. In SecureCRT, this sequence would be represented in your string as "\033" which is the decimal representation of an ASCII escape character.

The rest of the string would be entered literally, so F1 would be mapped to send "\033[11~".

Does this help you map the F1 - F4 keys to send the escape sequence that your remote application expects?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #11  
Old 09-02-2014, 02:09 PM
N4pkins N4pkins is offline
Registered User
 
Join Date: Aug 2014
Posts: 6
It did. Thanks so much for the help.
Reply With Quote
  #12  
Old 09-02-2014, 04:17 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi N4pkins,

Thanks for the update. I am glad to hear that this is resolved. Hopefully it will be helpful for others reading it.
__________________
--Todd

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

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 02:04 AM.