All Projects → JSubelj → g910-gkey-macro-support

JSubelj / g910-gkey-macro-support

Licence: GPL-3.0 license
GKey support for Logitech G910 Keyboard on Linux

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to g910-gkey-macro-support

keyboard-center
Application for mapping macro keys on Logitech keyboards
Stars: ✭ 37 (-56.47%)
Mutual labels:  keyboard, logitech, logitech-gaming, g910
React Hotkeys
React component to listen to keydown and keyup keyboard events, defining and dispatching keyboard shortcuts.
Stars: ✭ 279 (+228.24%)
Mutual labels:  keyboard, hotkeys, shortcut
Hotkeys
➷ A robust Javascript library for capturing keyboard input. It has no dependencies.
Stars: ✭ 5,165 (+5976.47%)
Mutual labels:  keyboard, hotkeys, shortcut
hotkey
⌨️ cross-platform hotkey package
Stars: ✭ 82 (-3.53%)
Mutual labels:  keyboard, hotkeys, shortcut
Capslock Plus
An efficiency tool that provides various functions by enhancing the Caps Lock key into a modifier key.
Stars: ✭ 650 (+664.71%)
Mutual labels:  keyboard, shortcut
Hotkey
Simple global shortcuts in macOS
Stars: ✭ 574 (+575.29%)
Mutual labels:  keyboard, shortcut
Globalhooks
Allows you to create global keyboard events
Stars: ✭ 74 (-12.94%)
Mutual labels:  keyboard, shortcut
Pyhooked
Pure Python hotkey hook, with thanks to pyHook and pyhk
Stars: ✭ 150 (+76.47%)
Mutual labels:  keyboard, hotkeys
react-keyboard-shortcuts
A declarative library for handling hotkeys based on explicit priority in React applications
Stars: ✭ 23 (-72.94%)
Mutual labels:  keyboard, hotkeys
Ng Keyboard Shortcuts
Dead Simple Keyboard Shortcuts Management for Angular
Stars: ✭ 121 (+42.35%)
Mutual labels:  keyboard, shortcut
Ktrl
A Supercharged Keyboard Programming Daemon ⌨️
Stars: ✭ 190 (+123.53%)
Mutual labels:  keyboard, daemon
keybind
ClojureScript key bindings (shortcut) library
Stars: ✭ 85 (+0%)
Mutual labels:  hotkeys, shortcut
metaKeyboard
turn a common keyboard into a 61-key keyboard for the keyboard shortcut fun like you, I'm a programer, I want to improve coding efficiency
Stars: ✭ 30 (-64.71%)
Mutual labels:  keyboard, shortcut
Pretzel
Pretzel is Mac desktop app that shows and find keyboard shortcuts based on your current app.
Stars: ✭ 405 (+376.47%)
Mutual labels:  keyboard, shortcut
Slowquitapps
Add a global delay to Command-Q to stop accidental app quits.
Stars: ✭ 916 (+977.65%)
Mutual labels:  keyboard, shortcut
Selectnextoccurrence
A Visual Studio Extension that selects the next occurrences of the current selection and adds multiple cursors for editing
Stars: ✭ 129 (+51.76%)
Mutual labels:  keyboard, shortcut
hotscript
HotScript - Revolutionizing how Windows works.
Stars: ✭ 29 (-65.88%)
Mutual labels:  keyboard, shortcut
ShortcutJS
Keyboard manager for javascript and typescript, made for humans 😎
Stars: ✭ 26 (-69.41%)
Mutual labels:  keyboard, shortcut
Is Hotkey
Check whether a browser event matches a hotkey.
Stars: ✭ 211 (+148.24%)
Mutual labels:  keyboard, hotkeys
react-shortcut
Convenient React component that detects if the given key combination is pressed, and triggers a callback
Stars: ✭ 16 (-81.18%)
Mutual labels:  hotkeys, shortcut

Logitech G910 keyboard gkey support for GNU/Linux (Project version: v0.2.4)

Because I didn't find any GKey support for Logitech G910 keyboard I decided to create this GKey mapper. Code is based on an issue in g910-gkey-uinput project. I expanded the code, so that it is more user friendly to add functionality to GKeys.

The code is tested on Logitech G910 keyboard, OS: Manjaro, 4.19.1 Linux kernel, DE: kde plasma 5.14.3.

Everything is described in great depth (and actually much better) on WIKI.

Note: From version 0.2.0 onwards the g810-led controller is no longer required because Gkey to Fkey mapping is disabled inside the driver.

Requirements

To use this project you need:

  • Python >=3.7
  • git
  • g810-led controller
  • uinput kernel module (more on this here)
  • pip requirements are stored in requirements.txt

Installation [AUR]

  • install g810-led-git for your distro (for Arch based distros: aur)
  • disable Gkeys to Fkeys mapping: g910-led -gkm 1 (probably will include that on program start)
  • load uinput kernel module: modprobe uinput (on Manjaro is loaded by default afaik)
  • clone repo: git clone https://github.com/JSubelj/g910-gkey-macro-support.git
  • move to cloned repo: cd g910-gkey-macro-support
  • run the installer shell: chmod +x installer.sh; sudo ./installer.sh
  • This will install the module and set a command g910-gkeys, add a service file to /usr/lib/systemd/system/g910-gkeys.service and reload systemd daemon
  • start the daemon: systemctl start g910-gkeys
  • you can also add it to start on startup: systemctl enable g910-gkeys

Uninstalling

  • Uninstalling can be done with files.txt that was created on install (if you deleted it you can always run the installer again to create it)
  • run command: cat files.txt | sudo xargs rm -rf
  • list pip packages that include g910: pip list | grep g910
  • remove the ones that concern this driver: pip uninstall ${pkgs to uninstall}
  • it is also recommended to disable the service: systemctl disable g910-gkeys
  • and remove it from system folder: rm /usr/lib/systemd/system/g910-gkeys.service
  • you can also delete the configuration: rm /etc/g910-gkeys -rf

Configuration

Configuration should be located in /etc/g910-gkeys/config.json and should be syntactically correct. Example configuration can be found in docs folder: ex_config. Currently the mapper supports three types of hotkeys (also described in hotkey_types.txt):

  • "typeout" - Type out (ex. clicking on GKey types out a string)
  • "shortcut" - Shortcuts (ex. clicking on GKey presses shift+f4)
  • "run" - Starting a program (anything you can start from shell) This works only on cli programs (see why: Why can't I run graphic programs by default).
  • "nothing" - Do nothing (unbound key)

To add a hotkey add to config.json the following code:

"g<no_of_gkey>": {
    "hotkey_type": <type of command "nothing" or "typeout" or "shortcut" or "run">,
    "do": "<thing to do>"
  }

Depending on the hotkey command, the syntax for "do" is different (supported characters for typeout and hotkeys are listed in supported_keys.txt):

  • "typeout" - Typeout syntax is same as you would type text out (ex. "tyPe Me Out!")
  • "shortcut" - Shortcuts are separated by a plus sign and a comma (ex. "ctrl+c,ctrl+v")
  • "nothing" - If hotkey_type is set to "nothing" then "do" key need not exist or can be anything.
  • "run" - Run has the same syntax as you would type a cli program in command line (ex. "systemctl daemon-reload")

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].