Editing Javascript 단축키 생성
From CS Wiki
Revision as of 05:32, 8 May 2023 by 개발새발 (talk | contribs) (새 문서: Javascript로 웹 페이지에서 단축키 사용 가능하게 만들기 == 예제 == ex) `Ctrl + Alt + c` 을 눌렀을 때 이벤트 생성 var isCtrl, isAlt; // ctrl. Alt 눌림 여부 확인 document.onkeyup = function(e) { if (e.which == 17) isCtrl = false; if (e.which == 18) isAlt = false; } document.onkeydown = function(e) { if (e.which == 17) isCtrl = true; if (e.which == 18) isAlt = true; console.log(e.which , isCtrl, isAlt)...)
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.