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

Hard coded shortcut key values #7

Open
aaxu opened this issue Jun 15, 2017 · 2 comments
Open

Hard coded shortcut key values #7

aaxu opened this issue Jun 15, 2017 · 2 comments
Assignees

Comments

@aaxu
Copy link
Contributor

aaxu commented Jun 15, 2017

I ran into some issues when testing out the program on various machines. On both my Arch Linux OS and Ubuntu 16.04 OS, the values for the shortcuts listed seem to differ per system. I have listed what I have gathered from testing below. All the ones listed are different from the ones currently in the code, the rest are the same.

ArchLinux

  • KEY_ALT_LEFT = 546
  • KEY_ALT_RIGHT = 561
  • KEY_ALT_SHIFT_LEFT = 547
  • KEY_ALT_SHIFT_RIGHT = 562
  • KEY_CTRL_DOWN = 528
  • KEY_CTRL_SHIFT_DOWN = 529
  • KEY_CTRL_LEFT = 548
  • KEY_CTRL_SHIFT_LEFT = 549
  • KEY_CTRL_RIGHT = 563
  • KEY_CTRL_SHIFT_RIGHT = 564
  • KEY_CTRL_UP = 569
  • KEY_CTRL_SHIFT_UP = 570
  • KEY_ALT_A = (97,). I had to find this key through another terminal in Arch. Read note below
  • KEY_ALT_B = (98,)
  • KEY_ALT_C = (99,)
  • KEY_ALT_S = (115,)

Ubuntu 16.04

  • KEY_ALT_LEFT = 543
  • KEY_ALT_RIGHT = 558
  • KEY_ALT_SHIFT_LEFT = 544
  • KEY_ALT_SHIFT_RIGHT = 559
  • KEY_CTRL_DOWN = 525
  • KEY_CTRL_SHIFT_DOWN = 526
  • KEY_CTRL_LEFT = 545
  • KEY_CTRL_SHIFT_LEFT = 546
  • KEY_CTRL_RIGHT = 560
  • KEY_CTRL_SHIFT_RIGHT = 561
  • KEY_CTRL_UP = 566
  • KEY_CTRL_SHIFT_UP = 567
  • KEY_ALT_A = (97,)
  • KEY_ALT_B = (98,)
  • KEY_ALT_C = (99,)
  • KEY_ALT_S = (115,)

NOTE: In some cases, I think the OS shortcuts and some terminal shortcuts take precedence over being inputs for the terminal. For example, on Ubuntu, my terminal can't detect CTRL+ALT+T because that is the OS shortcut to open a new terminal. In my case, specifically for Arch, I had to use another terminal because KEY_ALT_A opened up an option and thus couldn't be detected as an input. This case can be seen on both Arch Linux and Ubuntu when I try to use the KEY_SHIFT_F10 shortcut, which can't be detected since it pops up an option instead. In some other terminals, (I tested multiple in Arch Linux), the CTRL_SHIFT_* keys as well as a few others cannot be detected, but they didn't seem to be a shortcut for anything in particular. However, I don't think this note is a high priority matter since most of the important shortcuts seem to be detected with the default terminals.

@aaxu
Copy link
Contributor Author

aaxu commented Jun 15, 2017

Currently working on this issue to make it system independent.

@dschuyler
Copy link
Collaborator

This is a tricky area because of the age and layers of features / limitations in terminals. Thank you for investigating it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants