Giter VIP home page Giter VIP logo

ccbk's Introduction

Introduction

I don't like to use mouse, so here are results of my search and work in order to control mouse (and keyboard keys placed far away like arrows) by central part of keyboard in iseful and convenient way (if you use 10-finger touch typing, you will never move your arms). I have continuously used programs presented here since 2017 both at work and home (except for games and 3D software, of course). It is useful when one has mouse and very useful when mouse can't be used (e.g. in waiting hall). I can't say anything about influence of this way to work to progress of Carpal tunnel syndrome.

There are two programs, one is for linux (python), the second is for windows (autohotkey script) Both parts work almost in the same way from user point of view (I have windows at work and linux at home), but implementations are totally different.

The code is ugly, but working; refactor will be done in case of interest from other people.

Inspired by https://lexikos.github.io/v2/docs/scripts/NumpadMouse.htm

User guide (for both linux and windows):

Right alt: activation of mouse pointer control by keyboard Left win (super): deactivation of mouse pointer control by keyboard and activation of russian keyboard layout (ru) caps lock: deactivation of mouse pointer control by keyboard and activation of english keyboard layout (en) Emergency exit (could be required only at Linux part): press ScrollLock for several seconds

When control of mouse is active:

  • mouse pointer:
  •    l: left mouse button click
    
  •    w: left mouse button click
    
  •    m: right mouse button click
    
  •    d/f: mouse pointer to right/left
    
  •    i/j: mouse pointer to up/down
    
  •   influence of the following buttons to mouse pointer movements (when hold):
    
    •        ';' is for high acceleration
      
    •        a is medium acceleration
      
    •        s is medium slowdown
      
    •        a+s is high slowdown
      
  •    u/h: mouse wheel up/down
    
    •        during ';' or s hold it will be accelerated
      
  •    q: middle mouse button
    
  • Other keys:
    •    Keys working together with modifiers shift and a (instead of ctrl, only windows):
      
      •        arrows:
        
        •            e,r: left/right
          
        •            o,k: up/down
          
      •        c,x: pageUp/pageDown
        
      •        g,t: home/end
        
    •    b: menu button
      

Windows part

See file mouse_windows.ahk. (autohotkey script). This script is used as base (and the entire work is inspired by): "Using Keyboard NumPad as a Mouse -- by deguix" (https://lexikos.github.io/v2/docs/scripts/NumpadMouse.htm). Main differences are remapping of keys and addition of some other keys like arrows and PgDn/PgUp.

Linux part

dependencies: evdev

run: sudo python "./ccbk.py"

Active ('ccbk') mode of script is indicated by light of Caps lock for used keyboard

Bugs:

  • Sometimes script starts generate mouse movements, so, press any keys moving mouse, and it will be ok.
  • 3 at upper part of keyboard may stick

ccbk's People

Contributors

rafikor avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.