1押したらAlt + r押したことになるマシーン

Developer
Size
3,134 Kb
Views
4,048

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押したことになるマシーン Previews

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>"); }
}
1押したらAlt + r押したことになるマシーン - Script Codes
1押したらAlt + r押したことになるマシーン - Script Codes
Home Page Home
Developer Uriuriuriu
Username uriuriuriu
Uploaded January 10, 2023
Rating 3
Size 3,134 Kb
Views 4,048
Do you need developer help for 1押したらAlt + r押したことになるマシーン?

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!

Uriuriuriu (uriuriuriu) Script Codes
Create amazing sales emails with AI!

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!