Screencast your keys in Neovim
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.
https://github.com/NStefan002/screenkey.nvim/assets/100767853/29ea0949-4fd3-4d00-b5a3-2c249bb84360
lazy:
{
"NStefan002/screenkey.nvim",
cmd = "Screenkey",
version = "*",
config = true,
}
use({
"NStefan002/screenkey.nvim",
config = function()
require("screenkey").setup()
end,
})
:Rocks install screenkey.nvim
{
-- see :h nvim_open_win
win_opts = {
relative = "editor",
anchor = "SE",
width = 40,
height = 3,
border = "single",
},
-- 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 screenkeysudo
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.
<c-d>
mapped to <c-d>zz
, when you press
<c-d>
keys.nvim will show ^d z z
instead of ^d
.compress_after
option that enables it to compress your input - for example jjjjjj
will be displayed as j..x6
, which is usually way easier
to read and will save up a lot of space.