new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Tauri · Plugins and security · all subjects

global-shortcut/api

4 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Global Shortcut JavaScript API example

The global-shortcut JavaScript API is used as follows: import { register } from '@tauri-apps/plugin-global-shortcut'; await register('CommandOrControl+Shift+C', () => { console.log('Shortcut triggered'); }); Alternatively, when using "withGlobalTauri": true, access it via const { register } = window.__TAURI__.globalShortcut;

Global Shortcut Rust API example with handler

The global-shortcut Rust API example shows: use tauri_plugin_global_shortcut::{Code, GlobalShortcutExt, Modifiers, Shortcut, ShortcutState}; let ctrl_n_shortcut = Shortcut::new(Some(Modifiers::CONTROL), Code::KeyN); The builder accepts a with_handler that receives _app, shortcut, and event parameters. The handler can check shortcut state with event.state() returning ShortcutState::Pressed or ShortcutState::Released. Register the shortcut with app.global_shortcut().register(ctrl_n_shortcut)?;

Global Shortcut plugin available for JavaScript and Rust

The global-shortcut plugin provides APIs in both JavaScript and Rust programming languages.

Global Shortcut plugin JavaScript API register function

The Global Shortcut plugin provides a 'register' function in JavaScript that takes a shortcut string and a callback function. Example: await register('CommandOrControl+Shift+C', () => { console.log('Shortcut triggered'); });

Give your agent this brain