GithubHelp home page GithubHelp logo

macos-accessibility-keyboard's Introduction

macos-accessibility-keyboard


The missing interface for Apples' new native virtual keyboard.
Enter the macOS on-screen Accessibility Keyboard.


Contents

  1. Installation
  2. API
  3. Examples
  4. Platforms
  5. Contribututions
  6. Author

Usage

Installation

$ npm install macos-accessibility-keyboard --save

CommonJS Require

const keyboard = require('macos-accessibility-keyboard')

ES6 Module Import

import keyboard from 'macos-accessibility-keyboard'

API

This module exposes the following methods:

isEnabled()

  • Returns: Promise<Boolean>
  • Check whether the accessibility on-screen keyboard is enabled

isEnabledSync()

  • Returns: Boolean
  • Check whether the accessibility on-screen keyboard is enabled, synchronously

enable()

  • Returns: Promise
  • Enables the keyboard

disable()

  • Returns: Promise
  • Disables the keyboard

toggle()

  • Returns: Promise
  • Toggles the keyboard

Examples

Show

const {enable, disable} = require('macos-accessibility-keyboard');

enable().then(() => {
	console.log('The keyboard was enabled.')
	disable().then(() => {
		console.log('The keyboard was disabled.')
	})
})
>>> The keyboard was enabled.

Check

const keyboard = require('macos-accessibility-keyboard');

const isEnabled = keyboard.isEnabledSync()
console.log('The keyboard is:', isEnabled ? 'on': 'off')
>>>  The keyboard is: off

Platforms

Tested on macOS High Sierra 10.13.4.

Contribututions Contribute

Read the contribution documentation first.

  • Dev Chat: Talk about features and suggestions.
  • Issues File bugs and document issues.

Author

sidneys.github.io 2018

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.