Screenkey is a Neovim plugin that displays the keys you are typing in a floating window, just like screenkey does. It is useful for screencasts, presentations, and live coding sessions.
2024-04-16.22-42-26.mp4
- Neovim nightly (0.10.0+, not older than April 1st, since Screenkey requires #28098)
- a Nerd Font (optional, but recommended)
lazy:
{
"NStefan002/screenkey.nvim",
cmd = "Screenkey",
version = "*",
config = true,
}
use({
"NStefan002/screenkey.nvim",
config = function()
require("screenkey").setup()
end,
})
:Rocks install screenkey.nvim
Default settings:
{
-- see :h nvim_open_win
win_opts = {
relative = "editor",
anchor = "SE",
width = 40,
height = 3,
border = "single",
row = vim.o.lines - vim.o.cmdheight - 1,
col = vim.o.columns - 1,
-- The default `row` and `col` will put the window on the bottom left.
-- If you want to move it to the top left, use `row = 1`.
},
-- compress input when repeated <compress_after> times
compress_after = 3,
-- clear the input after <clear_after> seconds of inactivity
clear_after = 3,
-- temporarily disable screenkey (for example when inside of the terminal)
disable = {
filetypes = {}, -- for example: "toggleterm"
-- :h 'buftype'
buftypes = {}, -- for example: "terminal"
},
}
:Screenkey
to toggle the screenkey- Don't worry about leaking your passwords when using
sudo
while streaming/recording because you forgot to turn your display-key application,Screenkey
will only show pieces of information about your input in Neovim.
Note
If you're using a terminal inside of the Neovim, and you want screenkey to automatically stop displaying your keys when you're inside of the terminal, see disable
option in the plugin configuration.
- keys.nvim:
- As of the last update of this README, keys.nvim cannot process the literal keys you type - for example if you have
<c-d>
mapped to<c-d>zz
, when you press<c-d>
keys.nvim will show^d z z
instead of^d
. - Screenkey has
compress_after
option that enables it to compress your input - for examplejjjjjj
will be displayed asj..x6
, which is usually way easier to read and will save up a lot of space.
- As of the last update of this README, keys.nvim cannot process the literal keys you type - for example if you have