- Updated readme to include some better descriptions, added comments to install.py as a guide, added terminal-configs folder structure.

This commit is contained in:
Ryan Reaves
2019-07-27 12:06:26 -05:00
parent e4f96f475b
commit d4a28b2d3b
6 changed files with 49 additions and 1 deletions

View File

@@ -58,6 +58,44 @@ if result != "":
print(result)
internalid = subprocess.check_output('xinput list | grep -iv "Virtual\|USB" | grep -i "keyboard.*keyboard" | cut -d "=" -f 2- | awk \'{print $1}\';exit 0', shell=True).decode('utf-8')
# Loop the following to ensure the id is picked up after 5-10 tries
usbid = subprocess.check_output('udevadm info -e | stdbuf -oL grep -o -P "(?<=event-kbd /dev/input/by-path/pci-0000:00:).*(?=.0-usb)";exit 0', shell=True).decode('utf-8')
print("Internal Keyboard ID: " + internalid + "USB Keyboard ID: " + usbid)
# Print out/confirm the keyboard type or types detected, Windows, Mac, or Chromebook.
# Print out the keymap method/arrangement that will be used for the keyboard(s)
# - Normal apps - Alt will be Ctrl, Win/Super will be Alt, Ctrl will be Win/Super
# - Terminal apps (optional) - Alt will be Win/Super, Win/Super will be Alt, Ctrl will be Ctrl
#
# If Chromebook then create a local symbols file for swapping ctrl and alt.
# - setxkbmap -print > ~/.xkb/keymap/kbd.gui
# - modify ~/.xkb/keymap/kbd.gui xkb_symbols line with +myswap(swap_lalt_lctrl) inside the quotes at the end
# - create/copy lalt_lctrl to ~/.xkb/symbols/myswap
#
# Ask user how they would like their keymap to work
# 2 options will be given
# 1) Mac like option - Normal swap, but swap alt with super when the terminal is in use, so ctrl key behaves normally.
# 2) Always swapped - Always keep alt as ctrl.
#
# Begin test run on Internal Keyboard, have user confirm that it is correct
# Begin test run on External Keyboard, if one was attached, again ask user for confirmation
# Note: The test may use xev to confirm the key input.
# Ask user if they would like to apply Kinto persistently, run as a service
#
# - Windows keyboards
# - gui - setxkbmap -option altwin:ctrl_alt_win
# - terminal - setxkbmap -option altwin:swap_alt_win
# - Mac keyboards
# - gui - setxkbmap -option ctrl:swap_lwin_lctl
# - terminal - setxkbmap -option
# - Chromebook keyboard
# - gui - xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.gui $DISPLAY
# - terminal - setxkbmap -option altwin:swap_lalt_lwin
#
# Ask User if they would like Kinto to hook into udev/usb/hid to create persistent remaps for any keyboard
# If yes then create a file to hook into any udev/usb/hid keyboard devices when plugged in.
# Add autohotkey scripts to handle keymapping for Windows