Skip to content

Commit

Permalink
Merge pull request #2 from mangege/master
Browse files Browse the repository at this point in the history
使用 udev 自动加载驱动
  • Loading branch information
kinglongmee authored Mar 7, 2017
2 parents 5871e3d + 4f10d53 commit ab1e469
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions 40-rapoo-keyboard-driver.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1c4f", ATTR{idProduct}=="0059", RUN+="/usr/local/bin/install-rapoo-keyboard-driver.sh"
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,9 @@ endif

install:
cp -f hid-rapoo.ko /lib/modules/`uname -r`/kernel/drivers/hid/
cp -f install-rapoo-keyboard-driver.sh /usr/local/bin/
cp -f 40-rapoo-keyboard-driver.rules /etc/udev/rules.d/
@depmod
@grep -rn hid-rapoo ~/.bash_profile > /dev/null; \
if [ $$? -eq 1 ]; then \
cat installdriver.sh >> ~/.bash_profile; \
fi

clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Some bugfix for rapoo keyboard where some keys are invalid.

# Quick Usage
Compile the driver module with make, make install and run ./installdriver.sh.
Compile the driver module with make, make install and run ./install-rapoo-keyboard-driver.sh.

Job done! Then enjoy typing!

Expand Down
2 changes: 1 addition & 1 deletion installdriver.sh → install-rapoo-keyboard-driver.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

#install rapoo v500 driver

Expand Down

0 comments on commit ab1e469

Please sign in to comment.