Code Monkey home page Code Monkey logo

bespoke-keys's People

Contributors

joshwnj avatar markdalgleish avatar mojavelinux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bespoke-keys's Issues

Prevent default event on keypress?

Hi there, I'm using bespoke-keys to scroll to slides using the arrow keys:

bespoke
  .from('body', [bespokeKeys('vertical')])
  .on('activate', ({ slide }) => {
    slide.scrollIntoView({
      behavior: 'smooth',
      block: 'center',
      inline: 'nearest',
    });

    return false;
  });

But the browser scrolls a bit too far. After troubleshooting I found out it's because the default arrow key event causes a scroll too, calling event.preventDefault would fix this.

Would this be something to add to the code of this plugin? An alternative would passing keydown event so it can be used inside the activate event handler. Thoughts?

Don't intercept key events sent to editable inputs

Don't intercept key events that are being sent to an editable input, such as a text area.

Presenters often like to use editable inputs in the presentation to explain concepts, such as an editable source code block. Currently, it's impossible to type into one of these elements without triggering the slide navigation. The plugin should check to ensure that the element is not an editable input before acting on the key event.

Bind "f" to fullscreen mode

Many applications, presentation systems or otherwise, have gotten us used to being able to press the "f" key to enter fullscreen mode. I keep stumbling over this missing keybinding in bespoke.js while presenting. I hope to see this supported by bespoke-keys out of the box.

Ignore modified keydown events

Ignore keydown events if a modifier key is active (ctrl, shift, alt, etc). This prevents bespoke-keys from intercepting keyboard shortcuts, such as navigating tabs in the browser and such.

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.