Skip to content

Commit

Permalink
Merge pull request #23 from Gadgetoid/feature/releases
Browse files Browse the repository at this point in the history
Prep for attached release files
  • Loading branch information
Gadgetoid authored Feb 4, 2022
2 parents 214abab + c2b13b7 commit fd8bb80
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 1 deletion.
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,16 @@ if(NO_OUTPUT)
endif()

target_link_libraries(pi400kb libusbgx)

install(FILES
${CMAKE_CURRENT_LIST_DIR}/hook.sh
${CMAKE_CURRENT_LIST_DIR}/pi400kb.service
${CMAKE_CURRENT_LIST_DIR}/README.md
DESTINATION .
)

install(TARGETS pi400kb DESTINATION .)

set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
set(CPACK_GENERATOR "ZIP" "TGZ")
include(CPack)
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,28 @@ Press `Ctrl + Shift + Raspberry` (on the grabbed keyboard) to exit.

Pi 400 KB supports the official Raspberry Pi Mouse VID:PID = 093a:2510 by default, but other mice should work.

### Autostart

```
sudo cp pi400kb /usr/sbin/pi400kb
sudo systemctl edit --force --full pi400kb.service
```

Add the contents of the `pi400kb.service` file.

Start the service and check its status:

```
sudo systemctl start pi400kb.service
sudo systemctl status pi400kb.service
```

Enable start on boot if it's okay:

```
sudo systemctl enable pi400kb.service
```

## Building & Contributing

### Building
Expand Down Expand Up @@ -73,4 +95,4 @@ Supply these arguments when configuring with CMake, eg:

```
cmake .. -DMOUSE_DEV="/dev/input/by-id/usb-EndGameGear_XM1_Gaming_Mouse_0000000000000000-event-mouse" -DMOUSE_VID=0x3367 -DMOUSE_PID=0x1903
```
```
Binary file removed pi400kb
Binary file not shown.
12 changes: 12 additions & 0 deletions pi400kb.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=pi400kb USB OTG Keyboard & Mouse forwarding

[Service]
ExecStart=/usr/sbin/pi400kb
User=root
Group=root
Type=simple
Restart=on-failure

[Install]
WantedBy=multi-user.target

0 comments on commit fd8bb80

Please sign in to comment.