Verint | Telligent Community
Verint | Telligent Community
  • Site
  • User
  • Site
  • Search
  • User
Verint Community 11.x
  • Verint Community
Verint Community 11.x
API Documentation shortcuts JavaScript API Module
  • User Documentation
  • Ask the Community
  • API Documentation
  • Manager Training
  • Developer Training
  • Tags
  • More
  • Cancel
  • New
  • API Documentation
  • +In-Process API Documentation
  • +Plugin API Documentation
  • +REST API Documentation
  • -Widget, Theme, and Automation APIs
    • +Automation Events
    • -Client-side APIs
      • +Client Messages
      • +Composer Plugins
      • -JavaScript API Modules
        • administrationToolbar JavaScript API Module
        • editableGroup JavaScript API Module
        • javaScript JavaScript API Module
        • language JavaScript API Module
        • media JavaScript API Module
        • messaging JavaScript API Module
        • navigationConfirmation JavaScript API Module
        • notifications JavaScript API Module
        • preview JavaScript API Module
        • regex JavaScript API Module
        • rest JavaScript API Module
        • shortcuts JavaScript API Module
        • systemNotifications JavaScript API Module
        • template JavaScript API Module
        • tourTips JavaScript API Module
        • ui JavaScript API Module
        • url JavaScript API Module
        • utilities JavaScript API Module
      • +jQuery Events
      • +jQuery Plugins
      • +UI Components
    • +Dynamic Configuration
    • +LESS Functions
    • +Script API Types
    • +Script APIs

shortcuts JavaScript API Module


jQuery.telligent.evolution.shortcuts

This module provides a simple way to register keyboard shortcuts. Shortcuts can be defined with simple key combinations and can be assigned managed by their handle as well as optional namespaces. Shortcuts can also be scoped to target specific focused elements. Combined with the Keyboard Shortcuts widget, currently registered and available shortcuts can be displayed.

Methods

register

Registers a keyboard shortcut and returns a registration handle.

var handleId = $.telligent.evolution.shortcuts.register(shortcut, function(data) {
    // handle the shortcut
}, options);
  • shortcut: Keyboard combination string or array of strings to handle. Can be a simple string such as 'j' or any combination of case-insensitive modifiers such as 'ctrl + shift + j'. Modifiers include alt, meta, ctrl, shift, cmd, and opt. Additionally, direction arrows and special keys can also be used, such as 'ctrl + up', 'shift + esc', or simply 'ret'. If passed an array, maps each shortcut to the same handler.
  • If the handler function returns false, it prevents further bubbling of the key event.

Options is optional and can include:

  • description: optional description. When provided, the shortcut will be included by the Keyboard Shortcut widget when listing available shortcuts at any given time.
  • scope: optional DOM element, jQuery selection, or selector. When provided, shortcut will only trigger if the focused element is contained within the scope.
  • namespace: optional namespace string or array of namespace strings to allow clearing one or many multiple registered keyboard shortcuts later without having the registeration handle
  • direction: Whether to trigger on 'down' or 'up'. Default: direction.down.

unregister

Unregisters a keyboard shortcut or multiple shortcuts by handle id or namespace.

// Unregister by registration handle ID
$.telligent.evolution.shortcuts.unregister(handleId);
// Unregister by namespace
$.telligent.evolution.shortcuts.unregister('myNameSpace');
// Unregister all
$.telligent.evolution.shortcuts.unregister();

list

Lists currently registered shortcuts

$.telligent.evolution.shortcuts.list(options);

Options is optional and can include:

  • scoped: When true, only includes shortcuts which would be effectively triggerable based on the current focused element.

captureFocus

Stores the current focused element, useful for returning focus later

$.telligent.evolution.shortcuts.captureFocus();

refocus

Attempts to refocus on the last remembered focused element, including form inputs and rich text editors.

$.telligent.evolution.shortcuts.captureFocus();

  • Share
  • History
  • More
  • Cancel
Related
Recommended
  • Telligent
  • Professional Services
  • Submit a Support Ticket
  • Become a Partner
  • Request a Demo
  • Contact Us

About
Privacy Policy
Terms of use
Copyright 2024 Verint, Inc.
Powered by Verint Community