Skip to content

Commit

Permalink
Update Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jergusg committed Dec 28, 2018
1 parent ed8eb60 commit 517df68
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,38 @@
# k380-function-keys-conf
Make function keys on Logitech k380 bluetooth keyboard default
Make function keys default on Logitech k380 bluetooth keyboard.

based on
## Instructions

1) First install `gcc`. On Ubuntu run:
```
sudo apt install gcc
```
2) Download installation files.

3) Connect your K380 keyboard via bluetooth to your computer.

4) Run `build.sh`

```
./build.sh
```

5) To switch keyboard's upper keys to F-keys run:

```
sudo ./k380_conf -d /dev/hidrawX -f on
```
Where X is number of your keyboard hidraw interface. Possibly `0, 1, 2, 3`.

### Switch keys to F-keys automatically

Follow instructions your received when you built `k380_conf`:
```
sudo cp /your-build-path/80-k380.rules /etc/udev/rules.d/ && sudo udevadm control --reload
```
Now, when you reconnect your keyboard it will be automatically switched to F-keys mode.

## Based on

<http://www.trial-n-error.de/posts/2012/12/31/logitech-k810-keyboard-configurator/>

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ UDEV_RULES="$BUILD_PATH/80-k380.rules"

echo "ACTION==\"add\", KERNEL==\"hidraw[0-9]*\", RUN+=\"$FN_ON /dev/%k\"" > $UDEV_RULES
echo "To automatically turn on fn using udev rules, run the following command"
echo " sudo cp $UDEV_RULES /etc/udev/rules.d/ && sudo udevadm control -R"
echo " sudo cp $UDEV_RULES /etc/udev/rules.d/ && sudo udevadm control --reload"

3 changes: 2 additions & 1 deletion fn_on.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@


TOOL="$(dirname $0)/k380_conf"
# Check if device is our keyboard: 046D:B342
DEV="$(ls /sys/class/hidraw/ -l | grep 046D:B342 | grep -o 'hidraw[0-9]*$')"


# Run if parameter $1 is nothing or it is k380 keyboard
if test -n "$DEV" && (test -z "$1" || test "/dev/$DEV" = "$1")
then
echo "Found K380 at $DEV"
Expand Down

0 comments on commit 517df68

Please sign in to comment.