Giter Club home page Giter Club logo

keymapping-2's Introduction

touchcursor-mac

Port of the touchcursor-linux project to macOS.

Icon by Gregor Cresnar

Description

This application remaps the uiophjklnmy keys to different movement keys when the spacebar is pressed down, allowing you to keep your hands on the home row.

i - up
j - left
k - down
l - right
u - home
o - end
p - backspace
h - page up
n - page down
m - del
y - insert

Installation

In progress, but for now you may download this repository and build with XCode.

Thanks to

Martin Stone, Touch Cursor: wonderful project for cursor movement when coding.

Installation

  • Create automator wrapper app
  • add shell script that runs what is in 'setup.sh' script
  • i added the executable to my sudo visudo path
  • add automator wrapper app as login item

in sudo visudo

charltonprovatas ALL=(ALL) NOPASSWD: /Applications/touchcursor-mac.app/Contents/Resources/setup.sh charltonprovatas ALL=(ALL) NOPASSWD: /Applications/touchcursor-mac.app/Contents/MacOS/touchcursor-mac

Some old notes so i don't forget

Checked with the CG Folks and apparently CGEventTap stops working when the system is in secure input mode. This can be enabled by any process and can stay 'stuck', preventing taps from ever coming through until you log out or restart the machine.

This is also confirmed by the author of karabiner elements https://github.com/pqrs-org/Karabiner-Elements/blob/main/docs/DEVELOPMENT.md#cgeventtapcreate

It's not fully working yet but I'm getting the callbacks now for when you tap a key. I just need to wire up the keycodes with the map I have

cprovatas added 2 commits on Mar 31 @cprovatas moving to iokit since CGEventTap doesnt work when processes like logi… … e332bee @cprovatas WIP sending events using IOHIDPostEvent 8843090 @cprovatas

Owner Author cprovatas commented 27 days ago As I was implementing this, I discovered that there is an SPI called CGSSetSecureEventInput, that appears to toggle secure input mode. If this API actually works, then I wouldn't need to rewrite all of this using the IOKit APIs. I will investigate this first.

@cprovatas

Owner Author cprovatas commented 14 days ago • That doesn't work^. Window server validates the connection id against the app the enabled secure input mode. Any app can't disable it.

@cprovatas

Owner Author cprovatas commented 14 days ago Explored using the Services API, which seems plausable. It essentially creates a menu item on every application calls some SPI called _NSSaveServiceActions. The only part thats unclear is if you can create these service actions programmatically

@cprovatas

Owner Author cprovatas commented 14 days ago CGSSetSymbolicHotKey might be usable

@cprovatas

Owner Author cprovatas commented 14 days ago related: https://avaidyam.github.io/2018/03/16/Building-Better-RegisterEventHotKey.html

@cprovatas

Owner Author cprovatas commented 8 days ago Another method is to use HID Service Filters but I couldn't get that to work in Swift, also the debugging experience would be terrible running a plugin against the kernel

@cprovatas

Owner Author cprovatas commented 7 days ago • To detect if a connection is trusted– Skylight checks for presence of /var/db/.AccessibilitySecureTap file and if the process has the com.apple.private.accessibility.secureTap entitlement. I think also the kTCCServiceAccessibility entitlement. I confirmed this locally by using the Hot Key APIs

@cprovatas

Owner Author cprovatas commented yesterday CGSSetHotKey doesn't really work with just shift as the modifier key while in secure input mode. I also couldn't figure out how to filter input. Attempting to use a forked project instead

@cprovatas

Owner Author cprovatas commented now Using this as main project now – https://github.com/cprovatas/keymapping-2

keymapping-2's People

Contributors

cprovatas avatar donniebreve 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.