magmax / python-readchar

Python library to read characters and key strokes
MIT License
153 stars 46 forks source link

Page up & Page down produce multiple keypresses in `readkey` #14

Closed kcsaff closed 2 years ago

kcsaff commented 8 years ago

Not sure how general this issue is, but page up & page down in my terminal (OSX built-in "Terminal" application) produce the sequences ^[[5~ and ^[[6~ respectively. However, readchar.readkey produces two character sequences for these keypresses: ^[[5, ~ and ^[[6, ~. I expect them to produce just one sequence each.

What's surprising is DELETE has a similar escape code ^[[3~ which works properly.