Skip to content

Instantly share code, notes, and snippets.

@anekos
Created February 22, 2010 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anekos/311213 to your computer and use it in GitHub Desktop.
Save anekos/311213 to your computer and use it in GitHub Desktop.
// imap されていないキーで無視したいものは、inoremap <C-n> <nop> などとしておく
window.addEventListener(
'keypress',
function (event) {
if (modes.isMenuShown) {
let map = mappings.get(modes.INSERT, events.toString(event));
if (map) {
event.preventDefault();
event.stopPropagation();
map.execute();
}
}
},
false
);
@anekos
Copy link
Author

anekos commented Jun 19, 2011

某所のコメントよりしゅうせー

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment