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

New method to define keyboards (Closes #7) #8

Merged
merged 1 commit into from
Dec 1, 2020
Merged

New method to define keyboards (Closes #7) #8

merged 1 commit into from
Dec 1, 2020

Conversation

DavRack
Copy link
Owner

@DavRack DavRack commented Nov 21, 2020

This pull request implements

KeyboardName -> Keyboard name

Which gets the keyboard path at run time from /proc/bus/input/devices

For example. the keyboard i want to use with skr is "DavRack Atreus50"

I: Bus=0003 Vendor=feed Product=0000 Version=0111
N: Name="DavRack Atreus50"
P: Phys=usb-0000:00:14.0-5/input0
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb2/2-5/2-5:1.0/0003:FEED:0000.0001/input/input3
U: Uniq=0
H: Handlers=sysrq kbd event3 leds
B: PROP=0
B: EV=120013
B: KEY=1000000000007 ff9f207ac14057ff febeffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=1f

I: Bus=0003 Vendor=feed Product=0000 Version=0111
N: Name="DavRack Atreus50 Mouse"
P: Phys=usb-0000:00:14.0-5/input1
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb2/2-5/2-5:1.1/0003:FEED:0000.0002/input/input4
U: Uniq=0
H: Handlers=event4 mouse0
B: PROP=0
B: EV=17
B: KEY=1f0000 0 0 0 0
B: REL=1943
B: MSC=10

I: Bus=0003 Vendor=feed Product=0000 Version=0111
N: Name="DavRack Atreus50 System Control"
P: Phys=usb-0000:00:14.0-5/input1
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb2/2-5/2-5:1.1/0003:FEED:0000.0002/input/input5
U: Uniq=0
H: Handlers=kbd event5
B: PROP=0
B: EV=1b
B: KEY=40000001000000 1200000000 0 800000000 40000010cc00 10168000000000 0
B: ABS=10000000000
B: MSC=10

So the skr config file will look something like this

KeyboardName -> DavRack Atreus50
.
.
.

And skr will find the /dev/input path. in this case /dev/input/event3
KeyboardPath will remain the default option.

@DavRack DavRack changed the title New method to define keyboards (closes #7) New method to define keyboards (Closes #7) Nov 21, 2020
@gnufied
Copy link

gnufied commented Nov 21, 2020

Does this mean if event device path of keyboard changes after a hotplug skr will follow it and watch right device?

@DavRack
Copy link
Owner Author

DavRack commented Nov 21, 2020

Yes, skr kills the instance of skrcore when a keyboard is disconnected and launches a new one when the keyboard is connected, then skrcore parses the config file and calculates the device path if KeyboardName is used.

@DavRack DavRack linked an issue Nov 22, 2020 that may be closed by this pull request
@DavRack DavRack merged commit a6249e7 into master Dec 1, 2020
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 this pull request may close these issues.

Automatic keyboard detection
2 participants