Skip to content

jojczak/PenMouseS

Repository files navigation

Download

PenMouse S logo

PenMouse S

PenMouse S is an app that allows you to use the S Pen available on certain Galaxy devices to control the phone's on-screen cursor using air gestures.

The app was created thanks to the encouragement of many people from this Reddit thread after the small success of the Bird Hunt game - thanks to everyone for the ideas and feedback!

How does it work?

The app uses the gyroscope built into the S Pen to track its movements. It then displays an on-screen cursor overlay using Android's Accessibility API. When the S Pen button is pressed, the app simulates a finger tap on the screen.

One important note: due to limitations of the Accessibility API, all actions are deferred - meaning they are only executed after the S Pen gesture is completed. For example, if you hold the S Pen button and draw a circle in the air, the app will simulate that motion only after you release the button, not while you're drawing it.

Features

In addition to the mouse control mentioned earlier, the app also allows you to:

  • Adjust the cursor size
  • Change the mouse sensitivity
  • Automatically hide the cursor after a period of inactivity so it doesn't get in the way
  • Turn off the S Pen gyroscope after a period of inactivity to save battery
  • Change the cursor icon — the app includes three default icons, and you can also set a custom one

The app also includes a detailed setup guide with videos explaining how to prepare your phone for using the S Pen as a mouse. This is especially useful because some of the S Pen's built-in features need to be disabled to prevent them from interfering with the PenMouse S.

You can see a demonstration of the app in this video:
PenMouse S YouTube video

Supported devices

This app works ONLY on Samsung phones that have an S Pen with Air Actions functionality. Even if your device has a stylus but is not a Samsung device, the PenMouse S will not work, as it uses Samsung's SDK specifically for S Pen.

  • Samsung Galaxy Note Series: Galaxy Note10
  • Samsung Galaxy S Ultra Series: Galaxy S20-S24 Ultra
  • Samsung Galaxy Tab Series: Galaxy Tab S6 and newer (Air Actions depend on the specific S Pen model)

It also requires Android 12 or newer.

The S Pen SDK is quite a niche tool and has long been forgotten by Samsung. In fact, in their latest flagship phone, the S25 Ultra, they removed both Bluetooth connectivity and the gyroscope from the S Pen. So keep in mind that the app might work poorly, have bugs, or not work at all. Unfortunately, it's a bit random and depends on both the pen and the phone - don't say I didn't warn you!

Download

You can download PenMouse S from the Releases section here on GitHub or from Google Play:

Screenshots

Building the Project

  1. Clone the repository:
    git clone https://github.com/jojczak/PenMouseS.git
  2. Open Android Studio and click File > New > Import Project and select the PenMouseS repository folder.
  3. Select the app module from the run configurations dropdown and click the Run button

The app uses Firebase for analytics and crash tracking. To run the app from source, you need to place the google-services.json config file in the app folder or remove the Firebase dependencies from the app.

Used Libraries

  • Jetpack Compose - Declarative UI toolkit for building native Android apps
  • Hilt - Dependency injection framework
  • Haze by @chrisbanes - Real-time blur effects for Jetpack Compose
  • S Pen Remote SDK - Samsung's SDK for accessing motion and button input from the S Pen
  • Compose Richtext by Halil Ozercan
  • Android Accessibility Service API - Used to simulate touch events and show custom overlays

Legal

"Samsung" and "S Pen" are registered trademarks of Samsung Electronics Co., Ltd.
This app is not affiliated with, endorsed, or sponsored by Samsung Electronics Co., Ltd.

About

Android app that allows you to control the device using a simulated cursor with the S Pen stylus through air gestures.

Resources

License

Stars

42 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages