Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
better support of Arrows keys
Browse files Browse the repository at this point in the history
  • Loading branch information
NeotysLab committed Oct 7, 2019
1 parent 0b7f2f4 commit 9cf0eca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public SampleResult execute(Context context, List<ActionParameter> parameters) {
{

sampleResult.sampleStart();
final String output = channel.sendKeys(Key, TimeOut,NoWaitForEcho,ClearBufferBefore);
final String output = channel. sendKeys(Key, TimeOut,NoWaitForEcho,ClearBufferBefore);
sampleResult.sampleEnd();
appendLineToStringBuilder(responseBuilder, output);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,13 @@ public SpecialKeys apply(final String specialKeys) {
switch (specialKeys.toUpperCase())
{
case UP:
return SpecialKeys.of(Ascii.ESC, "[A".getBytes());
return SpecialKeys.of(Ascii.ESC, "OA".getBytes());
case DOWN:
return SpecialKeys.of(Ascii.ESC, "[B".getBytes());
return SpecialKeys.of(Ascii.ESC, "OB".getBytes());
case LEFT:
return SpecialKeys.of(Ascii.ESC, "[D".getBytes());
return SpecialKeys.of(Ascii.ESC, "OD".getBytes());
case RIGHT:
return SpecialKeys.of(Ascii.ESC, "[C".getBytes());
return SpecialKeys.of(Ascii.ESC, "OC".getBytes());
default:
return SpecialKeys.of(Ascii.ESC);
}
Expand Down

0 comments on commit 9cf0eca

Please sign in to comment.