keyboard icon indicating copy to clipboard operation
keyboard copied to clipboard

issue with the arrow keys

Open rajkumarks7 opened this issue 4 years ago • 4 comments

when ever i press any arrow key i am getting the error as panic: runtime error: index out of range [3] with length 3 goroutine 22 [running]: github.com/eiannone/keyboard.extract_event(0xc0000a4080, 0x3, 0x80, 0x1, 0x6600000001, 0x0, 0x0) /home/karthik/go/src/github.com/eiannone/keyboard/keyboard.go:68 +0x1ba github.com/eiannone/keyboard.inputEventsProducer() /home/karthik/go/src/github.com/eiannone/keyboard/keyboard.go:107 +0x7f created by github.com/eiannone/keyboard.initConsole /home/karthik/go/src/github.com/eiannone/keyboard/keyboard.go:197 +0x3de

Process finished with exit code 2

rajkumarks7 avatar May 07 '20 10:05 rajkumarks7

Hi @rajkumarks7 , which terminal are you using? Could you please tell me the output of echo $TERM command?

eiannone avatar May 07 '20 12:05 eiannone

xterm-256color I got this code when i ran that command .

rajkumarks7 avatar May 07 '20 13:05 rajkumarks7

Ok, should be fixed with latests commits 5797b640fd6d5e528d44c4f382c33be677c1c0c2 and caf4b762e807eee1398b6400b0288594bb963ffb. There was a typo, plus it seemed that reading escape sequences for special keys from terminfo files was not so reliable, so I switched to builtin mappings whenever possible.

Please pull latest version and check if it's working correctly now.

eiannone avatar May 08 '20 00:05 eiannone

thank you very much the issue got resolved. sir can you make this work behind the screen, i mean like not on terminal like when ever you press a key outside terminal or in other apps it should show like that . it is not showing any keys for the shift,alt,caplock , ctrl ,fn and windows key.if you can make it work behind the terminal it will awesome please tell me.

rajkumarks7 avatar May 08 '20 03:05 rajkumarks7