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

Arrow keys up,down,right,left returning A,B,C,D respectively only with MQL prompt. #46

Open
preetampatil3d opened this issue Dec 8, 2016 · 4 comments

Comments

@preetampatil3d
Copy link

While using MQL prompt in EC2Box terminal, arrow keys returning characters such as A,B,C,D instead of its normal functionality like arrow-up key for last history command.
[MQL ref : http://enoviaplm.blogspot.in/2009/07/mql-commands.html ]

image

At beginning i though data is getting replaced in terms.js, but actually jsch only returning such data ('A' for up arrow key . . ) . i have tried arrow-up key inside MQL prompt on putty and its working properly.
capture

I also tried with mysql prompt also, Keys are working properly.
Can you please tell us why its returning such chars only with MQL prompt.

Thanks in advance.

@skavanagh
Copy link
Collaborator

Things like this seem to happen when the term is set wrong.

env | grep TERM

should tell you what it's set to. I guess you should check before you launch MQL.

@preetampatil3d
Copy link
Author

I have checked "TERM" variable on various systems where i was getting arrow issue with MQL prompt.
On all systems it is set to 'xterm' (TERM=xterm).

@skavanagh
Copy link
Collaborator

so I imagine MQL is printing different key codes for arrow keys than what is sent with the xterm and terms.js isn't handling those

I've seen this before with vi

http://vim.wikia.com/wiki/Fix_arrow_keys_that_display_A_B_C_D_on_remote_shell

on other programs as well

http://stackoverflow.com/questions/1911861/how-to-fix-the-sml-nj-interactive-system-to-use-arrow-keys

you could maybe try and install rlwrap

alias MQL=’rlwrap MQL’ (not sure if that's the command to get you to the MQL prompt).

Also, maybe you could setup MQL to use readline (I don't know anything about it)

@preetampatil3d
Copy link
Author

I have simply assigned alternative shortcuts to these keys. For example Ctrl+p for up arrow key and so on.

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