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

Detachable keyboard computer fails to log #219

Open
J0nnyMak0 opened this issue Jun 27, 2020 · 5 comments
Open

Detachable keyboard computer fails to log #219

J0nnyMak0 opened this issue Jun 27, 2020 · 5 comments

Comments

@J0nnyMak0
Copy link

I have a 2-in-1 computer which fails to log keys. Following the documentation of this project, I found -d event24 fixes the problem. I'm reporting this issue per documentation. /proc/bus/input/devices attached.
devices.txt

@J0nnyMak0
Copy link
Author

Also is there a way to pass the device # to llk script?

@J0nnyMak0
Copy link
Author

And unfortunately, the event # changes with every reboot. It would be nice if there was some way to figure this out. Happy to provide debug info.

@J0nnyMak0
Copy link
Author

After thinking about this, the solution here would be to have an option for logkeys to identify devices by-id which are persistent and don't change across boots.

So, perhaps something like

logkeys -s -d-by-id  some-device-name

Alternatively if -d can take a relative path as input that should also work. In which case it would look like:

logkeys -s -d by-id/some-device-name

where the default location is /dev/input and then it would look in by-id directory for the device by id.

I prefer the second option since it gives us the flexibility to navigate to other device locations relative to /dev/input

@kernc
Copy link
Owner

kernc commented Jun 28, 2020

Some related effort expended in #161.

Alternatively if -d can take a relative path as input that should also work.

Seems only a slight adjustment needed there. PR welcome.

logkeys/src/logkeys.cc

Lines 675 to 677 in 0427dec

else { // event device supplied as -d argument
std::string::size_type i = args.device.find_last_of('/');
args.device = (std::string(INPUT_EVENT_PATH) + args.device.substr(i == std::string::npos ? 0 : i + 1));

@J0nnyMak0
Copy link
Author

Some related effort expended in #161.

Alternatively if -d can take a relative path as input that should also work.

Seems only a slight adjustment needed there. PR welcome.

logkeys/src/logkeys.cc

Lines 675 to 677 in 0427dec

else { // event device supplied as -d argument
std::string::size_type i = args.device.find_last_of('/');
args.device = (std::string(INPUT_EVENT_PATH) + args.device.substr(i == std::string::npos ? 0 : i + 1));

Absolutely, I got this working locally just last night. I'm looking at another issue where logkeys quits logging. I'm not sure what is causing it. It just issues a message that it has stopped logging. Either way, I'll open a PR soon-ish.

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