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

Use of xinput under linux could remove sudo requirement #34

Open
hexylena opened this issue Mar 7, 2016 · 1 comment · May be fixed by #36
Open

Use of xinput under linux could remove sudo requirement #34

hexylena opened this issue Mar 7, 2016 · 1 comment · May be fixed by #36

Comments

@hexylena
Copy link
Contributor

hexylena commented Mar 7, 2016

More of an FYI/feature request.

I don't know if xinput is available under OSX (judging by the issue reports, that's the primary user base), but under linux xinput allows you to capture key presses without requiring root.

$ xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ HP HD Webcam                              id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]
    ↳ HP Wireless hotkeys                       id=13   [slave  keyboard (3)]
    ↳ HP WMI hotkeys                            id=14   [slave  keyboard (3)]

$ xinput test 11 # AT Translated Set 2 keyboard, can move to other screens/windows.
key release 36 
key press   65 
key release 65 
key press   38 
key press   39 
key press   46 
ypid added a commit to ypid/ulogme that referenced this issue May 7, 2016
Closes karpathy#34

Additional improvements and fixes:

* Why use `cat`, `grep` and `wc` combined when `grep` can do all of this
  at once? Fixed. [shellcheck](https://www.shellcheck.net/) can make you
  aware of such things.

* Never storge highly sensitive information like keystrokes (which
  potentially can contain passwords) on persistent storage.

* Terminate background processes when the main process gets killed.

* Updated and fixed README.md accordingly.

* Removed trailing whitespace.
ypid added a commit to ypid/ulogme that referenced this issue May 7, 2016
Closes karpathy#34

Additional improvements and fixes:

* Why use `cat`, `grep` and `wc` combined when `grep` can do all of this
  at once? Fixed. [shellcheck](https://www.shellcheck.net/) can make you
  aware of such things.

* Never storge highly sensitive information like keystrokes (which
  potentially can contain passwords) on persistent storage.

* Terminate background processes when the main process gets killed.

* Suppress `bash` warning when background process dies.

* Updated and fixed README.md accordingly.

* Removed trailing whitespace.
ypid added a commit to ypid/ulogme that referenced this issue May 7, 2016
Closes karpathy#34

Additional improvements and fixes:

* Why use `cat`, `grep` and `wc` combined when `grep` can do all of this
  at once? Fixed. [shellcheck](https://www.shellcheck.net/) can make you
  aware of such things.

* Never storge highly sensitive information like keystrokes (which
  potentially can contain passwords) on persistent storage.

* Terminate background processes when the main process gets killed.

* Suppress `bash` warning when background process dies.

* Updated and fixed README.md accordingly.

* Removed trailing whitespace.
@ardentperf
Copy link

In addition to Docker, showkey is also causing problems on my debian jessie laptop. Probably an old version - but it seems to mess up the keyboard whenever i try to use the text consoles. (I have to magic-sysctl the keyboard back to raw to get control back).

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

Successfully merging a pull request may close this issue.

2 participants