• Stars
    star
    255
  • Rank 159,729 (Top 4 %)
  • Language
    Swift
  • Created almost 5 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Log keys pressed on macOS. Useful for screen recordings and presentations.

macos-key-cast Actions Status

Log keys pressed on macOS. Useful for screen recordings and presentations.

Requires macOS 10.12 or later. macOS 10.13 or earlier needs to download the Swift runtime support libraries.

Run as CLI

Using npx

$ npx macos-key-cast

Installing

$ npm install -g macos-key-cast
$ key-cast

Usage

Usage: key-cast [options]

Options:
  -b, --bounds <value>      JSON object with bounds of a rectangle to show the UI in. Example: '{"bounds":[[955,627],[656,384]]}'
  -d, --display <value>     Display number of the screen to show the UI in. Defaults to the main screen.
  -h, --help                Show help information
  -k, --key-combinations    Show key combinations only
  -s, --size <value>        Size of the window and font to use. Defaults to normal
  -t, --delay <value>       How long the key remains on screen in seconds

Node API

Installation

$ npm install macos-key-cast

Usage

const castKeys = require('macos-key-cast');

const process = castKeys({size: 'large', delay: 1.5, keyCombinationsOnly: true});

// Later

process.cancel();

Demo

Dark Mode support

API

castKeys(options: object): PCancelable<void>

Start the process.

The returned promise is an instance of PCancelable, so it has a .cancel() method which can be used to kill the process

options: object

Additional options passed to the CLI

options.size: 'small' | 'normal' | 'large'

Default: normal

How big the window and the font should be

options.delay: number

Default: 0.5

How long the window should remain on screen after the last key press

options.display: number

Display id of the screen to show the UI in. Defaults to the main screen.

Note: If you are using electron, you can find the display id in the Display Object.

options.keyCombinationsOnly: boolean

Default: false

Whether or not it should track all key presses or only combinations

options.bounds: Object

An object containing keys x, y, width, height defining an area within the display to use for the UI's initial position.

Contributing

If you want to use this and need more features or find a bug, please open an issue and I'll do my best to implement.

PRs are always welcome as well πŸ˜ƒ

Related

License

MIT

More Repositories

1

macos-audio-devices

Get, set and configure the Audio Devices on macOS
Swift
165
star
2

mac-screen-capture-permissions

Check and request permission to capture the screen
JavaScript
117
star
3

electron-builder-notarize

Notarize Electron applications using electron-builder
JavaScript
80
star
4

macos-manage-apps

Launch and terminate apps on macOS
Swift
60
star
5

mac-open-with

Open a file with an installed app on macOS
Swift
47
star
6

ink-scrollbar

Scrollbar Component for Ink
JavaScript
40
star
7

kap-recording-time

Show time elapsed while recording
Swift
36
star
8

mac-windows

Provide Information about Application Windows running
Swift
35
star
9

kap-soundflower

Record the system audio using Soundflower
JavaScript
28
star
10

ink-multi-select

Multi select input component for Ink
JavaScript
26
star
11

now-integration

A framework that allows better code structure and routing for ZEIT Integrations
TypeScript
23
star
12

kap-key-cast

Log keys pressed while recording
JavaScript
20
star
13

react-better-password

Password input for ReactJS that mimics mobile password masking behavior
JavaScript
19
star
14

kap-hide-clock

JavaScript
17
star
15

mac-focus-window

Focus a window and bring it to the front on macOS
Swift
15
star
16

kap-playback-speed

Speed up or slow down Kap recordings
JavaScript
14
star
17

kap-camera

JavaScript
14
star
18

macos-accessibility-permissions

Log keys pressed on macOS. Useful for screen recordings and presentations.
JavaScript
10
star
19

hide-desktop-icons

Hide the desktop icons for macOS
Swift
9
star
20

kap-dropbox

Upload recordings to Dropbox
JavaScript
9
star
21

ink-select

Select Component for Ink
JavaScript
7
star
22

kap-recording-name

Create meaningful names for your recordings
JavaScript
5
star
23

ink-aligned

Align Components horizontally for Ink
JavaScript
3
star
24

electron-builder-notarize-pkg

JavaScript
2
star
25

kap-hide-desktop-icons

JavaScript
2
star
26

kap-progress-bar

Add a progress bar to your recordings
JavaScript
2
star
27

now-storyblok

Storyblok integration for ZEIT's Now
TypeScript
2
star
28

kap-do-not-disturb

Silence notifications while recording
JavaScript
2
star
29

now-pusher

Pusher integration for ZEIT's Now
TypeScript
2
star
30

hide-desktop-icons-cli

Clean your desktop by temporarily hiding your icons
JavaScript
2
star
31

test

something
1
star
32

duty-pick-web

A static ReactJS app to utilize the duty-pick API
JavaScript
1
star
33

SpaceShips

A SpaceShip shooting game written in Java using swing and awt
Java
1
star
34

Resume

Resume Website
CSS
1
star
35

kap-reverse

Reverse Kap recordings
JavaScript
1
star
36

crypto-des

Step by step DES algorithm
JavaScript
1
star
37

SmartChecklist

Dynamic checklist that handles and adapts to exceptions
JavaScript
1
star
38

generator-ez-react-component

An easy generator for react components
1
star