Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to send F1 key to telnet server? #1

Closed
inspurhua opened this issue Feb 11, 2015 · 1 comment
Closed

how to send F1 key to telnet server? #1

inspurhua opened this issue Feb 11, 2015 · 1 comment

Comments

@inspurhua
Copy link

No description provided.

@bosha
Copy link
Owner

bosha commented Feb 11, 2015

Hello.
Sending function keys in VT100 is a bit complicated. You need to send it as ascii control character.

For F1-F4 function keys:

$telnet = new PTel\PTel();
$telnet->connect("hostname");
$telnet->login('username', 'password');

$telnet->send("\033OP", false); // F1
$telnet->send("\033OQ", false); // F2
$telnet->send("\033OR", false); // F3
$telnet->send("\033OS", false); // F4

@bosha bosha closed this as completed Feb 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants