All Projects → r4fun → keys

r4fun / keys

Licence: other
⌨️ Keyboard Shortcuts for 'shiny'

Programming Languages

r
7636 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to keys

react-hotkey-tooltip
A global Hotkey provider with built in tooltip for React
Stars: ✭ 34 (-8.11%)
Mutual labels:  hotkeys, keyboard-shortcuts, mousetrap
Mousetrap
Simple library for handling keyboard shortcuts in Javascript
Stars: ✭ 10,937 (+29459.46%)
Mutual labels:  keyboard-shortcuts, mousetrap
Hotkeys
➷ A robust Javascript library for capturing keyboard input. It has no dependencies.
Stars: ✭ 5,165 (+13859.46%)
Mutual labels:  hotkeys, keyboard-shortcuts
react-use-hotkeys
React hook for creating simple keyboard shortcuts
Stars: ✭ 74 (+100%)
Mutual labels:  hotkeys, keyboard-shortcuts
Chordly
Chordly is a javascript library that may be used to detect and act upon key sequences entered by a user.
Stars: ✭ 14 (-62.16%)
Mutual labels:  hotkeys, keyboard-shortcuts
Cropper
Point and shoot screen captures
Stars: ✭ 100 (+170.27%)
Mutual labels:  hotkeys, keyboard-shortcuts
Reakeys
⌨️ React Hotkeys Hook
Stars: ✭ 28 (-24.32%)
Mutual labels:  hotkeys
Videojs Hotkeys
Adds more hotkey support to video.js
Stars: ✭ 155 (+318.92%)
Mutual labels:  hotkeys
Hd To Tc
This tool will convert Age of Empires II HD to The Conquerors and create a seperate installation folder. You can also auto configure Voobly to start playing multiplayer instantly.
Stars: ✭ 13 (-64.86%)
Mutual labels:  hotkeys
Poe Trades Companion
Enhance your trading experience in Path of Exile. Highly customizable.
Stars: ✭ 395 (+967.57%)
Mutual labels:  hotkeys
Is Hotkey
Check whether a browser event matches a hotkey.
Stars: ✭ 211 (+470.27%)
Mutual labels:  hotkeys
Ahkdll
AutoHotkey_H
Stars: ✭ 177 (+378.38%)
Mutual labels:  hotkeys
Pyhooked
Pure Python hotkey hook, with thanks to pyHook and pyhk
Stars: ✭ 150 (+305.41%)
Mutual labels:  hotkeys
Clipinio
A clipboard manager.
Stars: ✭ 57 (+54.05%)
Mutual labels:  hotkeys
Hotkeys
🤖 A declarative library for handling hotkeys in Angular applications
Stars: ✭ 158 (+327.03%)
Mutual labels:  hotkeys
Angular2 Hotkeys
Keyboard shortcuts for Angular 2 apps
Stars: ✭ 179 (+383.78%)
Mutual labels:  hotkeys
Autohotkey l
AutoHotkey - macro-creation and automation-oriented scripting utility for Windows.
Stars: ✭ 5,090 (+13656.76%)
Mutual labels:  hotkeys
Jumpy
The fastest way to jump around files and across visible panes in Atom
Stars: ✭ 116 (+213.51%)
Mutual labels:  hotkeys
Winhue
Controlling the Philips Hue lighting system from your Windows PC.
Stars: ✭ 167 (+351.35%)
Mutual labels:  hotkeys
Autohotkey
⚙️ My Autohotkey productivity suite that includes shortcuts, hotstrings, hotkeys, apps/utilities, AutoCorrect
Stars: ✭ 113 (+205.41%)
Mutual labels:  hotkeys

keys

R build status CRAN status CRAN_Download_Badge Conda Version

The goal of keys is to add hotkeys to shiny applications using Mousetrap. With keys, you can:

  • Assign hotkeys on app load
  • Add and remove hotkeys from server
  • Pause and unpause hotkeys from server
  • Record keys from server

Installation

Install the released version of keys from CRAN:

install.packages("keys")

Or install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("r4fun/keys")

You can also install keys with conda-forge. More information here: https://github.com/conda-forge/r-keys-feedstock

Usage

To use keys, start by adding a dependency to it using useKeys().

Then, you can add a keysInput to the UI:

library(shiny)
library(keys)

hotkeys <- c(
  "1", 
  "command+shift+k", 
  "up up down down left right left right b a enter"
)

ui <- fluidPage(
  useKeys(),
  keysInput("keys", hotkeys)
)

server <- function(input, output, session) {
  observeEvent(input$keys, {
    print(input$keys)
  })
}

shinyApp(ui, server)

You can add binding after application launch using addKeys.

library(shiny)
library(keys)

ui <- fluidPage(
  useKeys(),
  actionButton("add", "Add keybinding")
)

server <- function(input, output, session) {
  observeEvent(input$add, {
    addKeys("keys", c("a", "b", "c"))
  })
  observeEvent(input$keys, {
    print(input$keys)
  })
}

shinyApp(ui, server)

Bindings can be removed after application launch using removeKey.

library(shiny)
library(keys)

ui <- fluidPage(
  useKeys(),
  keysInput("keys", c("a", "b", "c")),
  actionButton("rm", "Remove `a` keybinding")
)

server <- function(input, output, session) {
  observeEvent(input$rm, {
    removeKeys("a")
  })
  observeEvent(input$keys, {
    print(input$keys)
  })
}

shinyApp(ui, server)

For more information about what types of hotkeys you can use, please take a look at the mousetrap github repository.

Acknowledgements

All credit goes to Craig Campbell who is the author of Mousetrap.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].