Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddu_vim/deps.ts>fn.getcharmod

Dark deno-powered UI framework for neovim/Vim
Go to Latest
function fn.getcharmod
import { fn } from "https://deno.land/x/ddu_vim@v4.0.0/deps.ts";
const { getcharmod } = fn;

The result is a Number which is the state of the modifiers for the last obtained character with getchar() or in another way. These values are added together: 2 shift 4 control 8 alt (meta) 16 meta (when it's different from ALT) 32 mouse double click 64 mouse triple click 96 mouse quadruple click (== 32 + 64) 128 command (Macintosh only) Only the modifiers that have not been included in the character itself are obtained. Thus Shift-a results in "A" without a modifier. Returns 0 if no modifiers are used.

Returns

Promise<number>