1押したらAlt + r押したことになるマシーン
How do I make an 1押したらalt + r押したことになるマシーン?
でもevent名がおかしいマシーン. What is a 1押したらalt + r押したことになるマシーン? How do you make a 1押したらalt + r押したことになるマシーン? This script and codes were developed by Uriuriuriu on 10 January 2023, Tuesday.
1押したらAlt + r押したことになるマシーン - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>1押したらAlt + r押したことになるマシーン</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>1押したら<br>Alt + r押したことになるマシーン</h1>
<div id="comment"></div>
<div id="log"></div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
1押したらAlt + r押したことになるマシーン - Script Codes CSS Codes
@import url(https://fonts.googleapis.com/css?family=Merriweather:900);
body { padding: 30px; background-color: #E6E2D6; text-align: center; color: #333; font-family: 'Merriweather', serif;
}
h1 { font-size: 60px; padding-bottom: 20px;
}
#comment { font-size: 20px; line-height: 1.3em;
}
#comment div { border-bottom: dotted 1px #c6c2b6;
}
#log { position: fixed; right: 0; bottom: 0; padding-top: 20px; background-color: #333; width: 100%; height: 40px; color: #E6E2D6;
}
1押したらAlt + r押したことになるマシーン - Script Codes JS Codes
document.onkeydown = function(e){ var keyEvent = e || window.event; console.log("----"); console.log(e); $("#log").text(keyEvent.toString()); if(keyEvent.keyCode == 49){ // 1が押されたら $("#comment").prepend("<div>1押されたわ〜</div>"); // Alt + r 押したことにする // a. KeyboardEventで素直に作る。→だめだった!!!! // https://jsdo.it/hogeTaro225/teP6
// var e = document.createEvent('KeyboardEvent');
// e.initKeyboardEvent("onkeydown", true, true, window, true, false, false, true, 0, 82);
// document.dispatchEvent(e); // b. Eventで作成してKeyboardEventに差し替え // https://groups.google.com/forum/#!msg/chrome-api-developers-jp/nZgW_c61dvs/MnPSmsVvOuAJ var e = document.createEvent('Event'); var o = { type:'keydown', canBubble: true, cancelable: true }; var ko = { view: window, detail: 0, keyIdentifier: 'U+0052', keyLocation: 0, ctrlKey: false, shiftKey: false, altKey: true, metaKey: false, altGraphKey: false, keyCode: 82, charCode: 82, which: 82, layerX: 0, layerY: 0, pageX: 0, pageY: 0 }; e.initEvent(o.type, o.canBubble, o.cancelable); Object.keys(ko).forEach(function(k) { e[k] = ko[k]; }); e.__proto__ = document.createEvent('KeyboardEvent').__proto__; document.dispatchEvent(e); }else if(keyEvent.keyCode == 82 && keyEvent.altKey == true){ // Alt + r 押された? $("#comment").prepend("<div>alt + r押されたよー!!!</div>"); }else{ $("#comment").prepend("<div>1でもalt + rでもないわ〜。keyCode "+ keyEvent.keyCode +"だわ〜</div>"); }
}
Developer | Uriuriuriu |
Username | uriuriuriu |
Uploaded | January 10, 2023 |
Rating | 3 |
Size | 3,134 Kb |
Views | 4,048 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
ClickPanel | 3,068 Kb |
Glitchicken | 2,764 Kb |
Css action sideBar | 3,928 Kb |
Simple genetic algorithm | 10,179 Kb |
Canvas Gaussian Blur | 3,439 Kb |
Three.js earth | 3,423 Kb |
Css background animation | 2,854 Kb |
Canvas circle gauge | 3,773 Kb |
Three.js ver.2 animation | 3,114 Kb |
Shuffle text word separator | 3,208 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
BenU Maintenance Site | Ksherman | 4,893 Kb |
A Bouncy Menu Toggle | Billyysea | 4,563 Kb |
Simple personal profile | Miroot | 2,856 Kb |
Bootstrap Carousel Fade Transition | Rowno | 2,484 Kb |
Social buttons | Flacu | 2,022 Kb |
Multi column experiment. | Spylefkaditis | 2,805 Kb |
Responsive scrolling text | Ashdurham | 2,259 Kb |
Using Flickr API | MoyArt | 6,761 Kb |
A form arranged using automatic placement. | Vikasford | 2,103 Kb |
Degree Picker | Idered | 4,307 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!