mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2024-12-27 21:58:18 +01:00
21 lines
812 B
Lua
21 lines
812 B
Lua
-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
-- License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
-- file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
--
|
|
-- SPDX-License-Identifier: MPL-2.0
|
|
|
|
---Input and keybinds
|
|
---@module InputModule
|
|
local input_module = {}
|
|
|
|
---Set a keybind. If called with an already existing keybind, it gets replaced.
|
|
---
|
|
---### Example
|
|
--- -- Set `Super + Return` to open Alacritty
|
|
--- input.keybind({ "Super" }, input.keys.Return, function()
|
|
--- process.spawn("Alacritty")
|
|
--- end)
|
|
---@tparam Modifier[] modifiers Which modifiers need to be pressed for the keybind to trigger.
|
|
---@tparam Keys key The key for the keybind.
|
|
---@tparam function action What to do.
|
|
function input_module.keybind(modifiers, key, action) end
|