Insubstantial mouse moved by finger.



This is a Python script that uses a web camera to capture your hand, making it appear as if there is a mouse without any substance. (Ver.1 without sensitivity adjustment is here)
The operation status is also available on Youtube


  • Install as usual

    % cd ~/.../NonMouse2-main
    % pip install -r requirments.txt
  • If you don't want to pollute your local environment

    % cd ~/.../NonMouse2-main
    % . NonMouse/bin/activate           # Enter the virtual environment. 

    Exit the virtual environment with $ deactivate.

※ For mac, you need to add the location where you want to run it, such as Terminal or VScode, to the Security and Privacy Accessibility section in System Preferences.



Download the NonMouse folder, unzip it, and run the following script

% cd ~/.../NonMouse2-main
% python3

Hand Movements

  • The tip of the index finger corresponds to the mouse cursor.
  • Attaching the fingertips of the index finger and the middle finger stops the mouse cursor from moving.
  • Attaching the fingertip of the thumb to the second joint of the index finger releases the left click, releasing it releases the left click
  • Scrolling and right-clicking are not implemented yet.


  • If you have more than one camera installed, you can use --device X to select a camera (default 0, 0,1,2... can be selected)

    % python3 --device 0
  • Use --direciton X to specify the direction the mouse cursor moves in relation to the direction your finger moves (default 0, 0,1 can be selected).

    • When using a web camera facing down: 0

    • When using the camera that comes with the laptop: 1

      % python3 --direction 0

  • Define the touch distance with --distance X (the further the distance, the smaller the value, the closer the distance, the larger the value) (default 65, can be selected as an integer)

    • When the distance between the web camera and your hand is 50cm, 65

    • When the distance between the webcam and your hand is 110cm, 50

      % python3 --distance 50

  • Define the mouse sensitivity with --kando X (don't make it too large because it will shake in small increments if you make it too large) (default 1.5, selectable in decimal fraction)

    • 1.5 when the distance between the web camera and your hand is 50cm.

    • When the distance between the webcam and your hand is 110cm, 5

      % python3 --kando 5

We have put these arguments into a shell script so that they can be specified together.

  • is a script to use a laptop web camera

  • is a script to use a ceiling-mounted webcam.

    % cd ~/.../NonMouse2-main
    % chmod 755
    % chmod 755
    % chmod 755

Drag the .sh file to the terminal and enter

Stop a program

When a terminal window is active, press Ctrl+C
When an application window is active, press Esc