Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@molecule/app-keyboard-shortcuts-angular

Latest version: v1.1.1

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: vialoh
45 Stars
4 Forks
2 Versions
521 Downloads
TypeScript Repo language

Scan summary

@molecule/app-keyboard-shortcuts-angular was last scanned on 29 Nov 2026 at version 1.1.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions; the latest was published on 29 Nov 2026.
  • Findings: No rules fired in version 1.1.1.
  • Downloads: 521 downloads.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.1.1 LATEST 29 Nov 2026 No rules fired
1.1.0 16 Nov 2026 No rules fired

No rules fired in 1.1.1

Findings

Findings for v1.1.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.1.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@molecule/app-keyboard-shortcuts-angular

Angular functions for @molecule/app-keyboard-shortcuts.

{@link useKeyboardShortcut} registers a shortcut with the bonded provider for the life of a component and always calls the latest handler, so a component can bind / to focus its search box or mod+k to open a palette in one line. It is the Angular counterpart of @molecule/app-keyboard-shortcuts-react: same names, same options, same provider calls.

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Quick Start

import { Component, type ElementRef, viewChild } from '@angular/core'
import { useTranslation } from '@molecule/app-angular'
import { useKeyboardShortcut } from '@molecule/app-keyboard-shortcuts-angular'

@Component({
  selector: 'app-search',
  template: '<input #input />',
})
export class Search {
  // The binding's t re-runs the template on a locale switch.
  protected readonly t = useTranslation().t

  readonly input = viewChild.required<ElementRef<HTMLInputElement>>('input')

  // A field initializer runs in the injection context.
  readonly shortcuts = useKeyboardShortcut('/', () => this.input().nativeElement.focus(), {
    description: this.t('catalogSearch.focus', undefined, { defaultValue: 'Focus search' }),
  })
  readonly palette = useKeyboardShortcut('mod+k', () => openPalette())
}

Type

feature

Installation

npm install @molecule/app-keyboard-shortcuts-angular @angular/common @angular/core @angular/platform-browser @molecule/app-angular @molecule/app-keyboard-shortcuts @molecule/app-ui @molecule/app-ui-angular

API

Interfaces
UseKeyboardShortcutOptions

Options for {@link useKeyboardShortcut} in @molecule/app-keyboard-shortcuts-angular.

interface UseKeyboardShortcutOptions {
  /** Register the shortcut at all. `false` unregisters it. Defaults to `true`. */
  enabled?: boolean

  /** What the shortcut does, already translated, for a shortcuts panel. */
  description?: string

  /** The provider scope to register under. */
  scope?: string

  /** Call `preventDefault()` on the event. Defaults to `true`. */
  preventDefault?: boolean
}
Functions
expandKeys(keys)

Normalizes a key spec: 'mod+k' becomes both ctrl+k and command+k, so one declaration serves every platform.

function expandKeys(keys: string | string[]): string[]
  • keys — One combination or several.

Returns: The combinations to register.

useKeyboardShortcut(keys, handler, options)

Registers keys with the bonded keyboard-shortcuts provider for the life of the component (DestroyRef), and unregisters on destroy or when enabled turns false. The latest handler is always the one called: pass a changing action as a signal, which the registration reads at call time. With no provider bonded the function does nothing.

Call it in an injection context (a component field initializer or constructor), the way an app calls Angular's injection-based APIs. Pass keys or options as a signal when any part of them can change: a changed combination, enable flag, description, scope or preventDefault flag unregisters the previous registration and registers the new one on the SAME instance, the way React re-renders the hook with new arguments.

function useKeyboardShortcut(
  keys: string | string[] | Signal<string | string[]>,
  handler: ShortcutHandler | Signal<ShortcutHandler>,
  options?: UseKeyboardShortcutOptions | Signal<UseKeyboardShortcutOptions>,
): void
  • keys — One combination or several ('mod+k' is expanded to ctrl+k and command+k), or a signal of either.
  • handler — Called with the keyboard event; or a signal of one, read at call time.
  • options — Enable flag, description, scope, preventDefault; or a signal of them.

Injection Notes

Requirements

Peer dependencies:

  • @angular/common ^22.0.0
  • @angular/core ^22.0.0
  • @angular/platform-browser ^22.0.0
  • @molecule/app-angular ^3.5.0 || ^4.0.0
  • @molecule/app-keyboard-shortcuts ^1.0.1
  • @molecule/app-ui ^1.0.1
  • @molecule/app-ui-angular ^1.1.0
Runtime Dependencies
  • @angular/common

  • @angular/core

  • @angular/platform-browser

  • @molecule/app-angular

  • @molecule/app-keyboard-shortcuts

  • @molecule/app-ui

  • @molecule/app-ui-angular

  • mod+ means Ctrl on Windows and Linux, Command on macOS — the function registers both, so never write ctrl+k for a shortcut people expect as ⌘K on a Mac.

  • Whether a shortcut fires while an input has focus is the bond's decision (the hotkeys bond suppresses it, which is what / needs). Keys the input itself should handle — Escape to clear, arrows to move — belong on the input's own keydown handling, not here.

  • With no provider bonded the function is a no-op rather than an error, so a shared component still renders in an app that never wired shortcuts.

  • The description is shown by shortcut panels: pass it through t().

  • Call it in an injection context (a field initializer or constructor). Pass keys or options as a signal when any part of them can change, and a changing handler as a signal too; both are read at call time.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @molecule/app-keyboard-shortcuts-angular

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Frame 2085668439 (1)
Group 1261154229