Skip to content

Latest commit

 

History

History
111 lines (80 loc) · 5.22 KB

k6.md

File metadata and controls

111 lines (80 loc) · 5.22 KB

Keychron K6

Table of Contents

  1. udev
  2. Numlock
  3. Battery
  4. Sleep
  5. F Keys on Ubuntu
  6. Swapping Cmd and Alt/AltGr
  7. Keymap
  8. Firmware
  9. Fast reconnect bluetooth

udev

This udev rule is credited to Emilio Coppa from the Facebook: Keychron User Group and was provided as GitHub Gist: ercoppa/80-keychron.rules.

  1. Create udev rule sudo touch /etc/udev/rules.d/80-keychron.rules
  2. Add the udev rule SUBSYSTEMS=="input", ATTRS{name}=="Keychron K6", RUN+="echo 0 | tee /sys/module/hid_apple/parameters/fnmode" to /etc/udev/rules.d/80-keychron.rules
  3. sudo udevadm control --reload-rules && sudo udevadm trigger

An alternative solution was offered by Thạch Nguyễn.

  1. Set fkeyfirst by:
  • create the conf file sudo touch /etc/modprobe.d/hid_apple.conf.
  • add this line to the file: options hid_apple fnmode=1 and save
  • sudo update-initramfs -u
  • reboot
  1. Use the keyboard in Windows/Android mode

Numlock

If you get stuck in Numlock mode, double tap fn2 + F6 to disable it. Alternative way is to open onboard and disable "NmLk" in there.

Battery

The battery can report it's state via upower. If your distribution supports this you will be able to get a battery indicator on your desktop.

To check the keyboard is recognized type:

$ upower --dump | grep keyboard -A 7

You can get some GUI front-end to reflect the battery status, and different distributions often have them enabled by default. Examples include gnome-power-statistics, mate-power-statistics, Arch with Gnome has battery reporting working out of the box and in Ubuntu Settings ⇾ Power it's also working.

Sleep

The keyboard goes to Auto Sleep Mode in 10 mins of sitting idle to save battery.

Press fn1 + S + O (for 3 seconds) to disable the Auto Sleep Mode. If you want to go back to the Auto Sleep Mode, press fn + S + O (for 3 seconds) again. (Wait for the visual light confirmation.)

F Keys on Ubuntu

There is a discussion on Stackexchange regarding making the F Keys work.

Claus Zotter noticed the F1F12 keys always act as though function key is pressed.

Edit (create if it doesn't exist, it doesn't on 16.04) /etc/modprobe.d/hid_apple.conf and add the line options hid_apple fnmode=1 followed by:

$ sudo update-initramfs -u && reboot

If you want to test without rebooting, run rmmod hid_apple && modprobe hid_apple. Warning: If the Keychron K6 keyboard is the only input device, beware that doing so might leave your computer in an inoperable state unless hard reboot when the second command failes.

fnmode = 0 disable fn key fnmode = 1 function keys are used as last key fnmode = 2 function keys are used as first key

Reference:

  • Claus Zotter Gist
  • Andrii Shkodyn Gist who also noticed he does not get a bind action on Ubuntu 16.04 but that it was working as expected on 18.04. (Seems of no issue with 1.6 in 16.04)

Swapping Cmd and Alt/AltGr

To swap the left Alt and Cmd keys and use the keyboard in PC mode, edit and /etc/modprobe.d/hid_apple.conf and add the line options hid_apple swap_opt_cmd=1. This also fixes the right AltGr on non US layouts (ISO layouts) not working.

Keymap

If your Keymap appears to be incorrect make sure that /sys/module/hid_apple/parameters/fnmode is set to 0 and not 1.

Method of binding shift + delete to insert suggested by Konstantinos Liopetas.

$ xmodmap -pke | grep Delete
My Output was:
keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Separator
keycode 119 = Delete NoSymbol Delete NoSymbol Delete

So what I did was to add the following line on my ~/.bashrc (to persist change on reboot)

xmodmap -e "keycode 119 = Delete Insert Delete NoSymbol Delete"

Reference: Ask Ubuntu

Keymap: en-GB (United Kingdom)

When the keymap is changed to en-GB many characters useful for Linux administration and programming are hard to find.

The following is a list of the characters I have been able to locate on the changed keymap. The \ | describes the key above enter on the Keychron K6.

# = "\ |" 
\ = AltGr + "\ |"  
~ = Shift + "\ |"

I have not located |

Firmware

Keychron are investigating Linux Vendor Firmware Service as a possible solution to delivering firmware on Linux, at present it is only possible to update the firmware via Windows.

Fast reconnect bluetooth

For faster reconnect need to set "FastConnectable" to true in /etc/bluetooth/main.conf