import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.B9AX-CPi.js"; const __pageData = JSON.parse('{"title":"Secure","description":"","frontmatter":{},"headers":[],"relativePath":"features/secure.md","filePath":"features/secure.md","lastUpdated":null}'); const _sfc_main = { name: "features/secure.md" }; const _hoisted_1 = /* @__PURE__ */ createStaticVNode('

Secure

The secure feature aims to prevent unwanted interaction without user intervention.

TIP

Secure does not currently implement encryption/decryption/etc and should not be a replacement where a strong hardware/software based solution is required.

Unlock sequence

To unlock, the user must perform a set of actions. This can optionally be configured to be multiple keys.

Automatic Locking

Once unlocked, the keyboard will revert back to a locked state after the configured timeout. The timeout can be refreshed by using the secure_activity_event function, for example from one of the various hooks.

Usage

Add the following to your rules.mk:

make
SECURE_ENABLE = yes

Keycodes

KeyAliasesDescription
QK_SECURE_LOCKSE_LOCKRevert back to a locked state
QK_SECURE_UNLOCKSE_UNLKForces unlock without performing a unlock sequence
QK_SECURE_TOGGLESE_TOGGToggle directly between locked and unlock without performing a unlock sequence
QK_SECURE_REQUESTSE_REQRequest that user perform the unlock sequence

Configuration

DefineDefaultDescription
SECURE_UNLOCK_TIMEOUT5000Timeout for the user to perform the configured unlock sequence - 0 to disable
SECURE_IDLE_TIMEOUT60000Timeout while unlocked before returning to locked - 0 to disable
SECURE_UNLOCK_SEQUENCE{ { 0, 0 } }Array of matrix locations describing a sequential sequence of keypresses

Functions

FunctionDescription
secure_is_locked()Check if the device is currently locked
secure_is_unlocking()Check if an unlock sequence is currently in progress
secure_is_unlocked()Check if the device is currently unlocked
secure_lock()Lock down the device
secure_unlock()Force unlock the device - bypasses user unlock sequence
secure_request_unlock()Begin listening for an unlock sequence
secure_activity_event()Flag that user activity has happened and the device should remain unlocked
', 17); const _hoisted_18 = [ _hoisted_1 ]; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", null, _hoisted_18); } const secure = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); export { __pageData, secure as default };