Skip to content

A tiny no-dependency library that provides callbacks for all four action keys on presenters.

License

Notifications You must be signed in to change notification settings

defaude/presenter-keys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

presenter-keys

Tiny no-dependency library that allows you to easily bind actions to the keys of presenters like e.g. the Logitech R800 Presenter.

Those kinds of presenters are basically keyboards that will send the following key codes:

  • Previous => PageUp (33)
  • Next => PageDown (34)
  • Run => Alternating between F5 (116) and Escape (27)
  • Blank => A simple dot (190)

Direct usage

Simply import the presenterKeys function module and call it with the callback functions you want to attach to the different keys:

<script type="module">
    import { presenterKeys } from "https://unpkg.com/@defaude/presenter-keys";

    presenterKeys({
        prev: () => console.log('prev'),
        next: () => console.log('next'),
        run: () => console.log('run'),
        blank: () => console.log('blank')
    });
</script>

Based on the available keys, the four available callbacks are prev, next, run and blank. You don't need to pass all four callbacks - maybe you just need prev and next in most cases.

Installation as npm package

This is published as npm package, so you can just

npm install @defaude/presenter-keys

and use it in your code

import { presenterKeys } from '@defaude/presenter-keys';

presenterKeys({ /* ... */ });

About

A tiny no-dependency library that provides callbacks for all four action keys on presenters.

Topics

Resources

License

Stars

Watchers

Forks