Skip to contents

Lists all shortcuts declared in .shrtcts.R or .shrtcts.yml. Also lists the currently assigned RStudio keyboard shortcuts.

Usage

list_shortcuts(path_shortcuts = NULL, path_addins_json = NULL)

Arguments

path_shortcuts

Path to .shrtcts.R or .shrtcts.yml. See locate_shortcuts_source() for more detail.

path_addins_json

Path to RStudio's addins.json keybindings config file. See locate_addins_json() for more detail.

Value

A data frame with the shortcut name, it's assigned addin

placeholder function, the shrcts_keybinding declared in the shrtcts source file, and the rstudio_keybinding currently assigned to the shortcut in RStudio.

Examples

if (
  interactive() &&
  requireNamespace("rstudioapi", quietly = TRUE) &&
  rstudioapi::hasFun("versionInfo")
 ) {
  list_shortcuts()
}