The last time I used to look for, this time found, collection up. 0x1 left mouse button 0x2 right 0x3 CANCEL key 0x4 middle mouse button 0x8 BACKSPACE key 0x9 TAB 0xC CLEAR key 0xD ENTER key 0x10 SHIFT key 0x11 CTRL key 0x12 MENU key 0x13 P Ause key 0x14 CAPS LOCK 0x1b ESC key 0x20 SPACEBAR key 0x21 page UP key 0x22 PAGE DOWN key 0x23 END key 0x24 HOME key 0x25 left ARROW key 0x26 up Arrow key 0x27 right ARROW key 0x28 down ARROW key 0x29 SELECT key 0x2a PRINT screen key 0x2b EXECUTE key 0x2c S
Every day, a JS demo uses the keyboard arrow keys to seamlessly switch between top, bottom, and left. Key knowledge points: events, jsdemo
// Animation format FormulaVar Tween = {Linear: function (t, B, c, d ){Return c * t/d + B;},EaseIn: function (t, B, c, d ){Return c * (t/= d) * t + B;},EaseOut:
JQuery implements page flip by keyboard arrow keys
This article will share with you the special effect of using jQuery to press the arrow key of the keyboard to flip pages. The code is very simple and the function is very practical. We recommend it to you and hope you will like it.
1. jQuery code:
The Code is
What is a keyboard accelerator key?
Accelerators are key combinations that produce WM_COMMAND messages (in some cases, wm_syscommand). In many cases, the program uses an accelerator key to repeat the action of a common menu item (however, the accelerator key can also be used to run non-menu functions). For example, many Windows programs have an Edit menu that contains a Delete or clear option, which is used to specify the DEL key as the accelerator k
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Function test ()
{
Alert (event. x + "" + event. y );
Alert (event. button );
}/* The right-click menu is not displayed */
Document. oncontextmenu = function ()
{
Return false;
}
/* Document. onmousedown = function ()
{
If (event. button = 1)
{Alert ("left ")}
Determine whether you want to disable the global control or specify the control. If it is global, you only need to listen to the window. keyDownfunction (event ){.....} the same is true. If you are interested, you can check whether you want to disable global controls or specified controls. For example, if you only need to disable the up and down keys of a text box
The Code is as follows:
NoExec = function
First, you need to determine whether you want to disable the global control or the specified control. For example, I only need to disable the up and down keys of a text box.
Copy codeThe Code is as follows: NoExec = function (event ){
Var k = event. which | event. keyCode;
If (k = 13 | k = 38 | k = 40 ){
If ($ ("# atWinByArea"). attr ("id ")){
If (event. which) {// Firefox
Event. preventDefault ();
}
First you want to make sure you want to disable global or specified controls, such as I just disable the upper and lower keys of a text box
Copy Code code as follows:
noexec = function (event) {
var k = Event.which | | Event.keycode;
if (k = = | | k = = | | k = = 40) {
if ($ ("#atWinByArea"). attr ("id")) {
if (Event.which) {//Firefox
Event.preventdefault ();
else {//ie, Chrome
Event.return
= ediaeresis Ediaeresiskeycode 248 = idiaeresis Idiaeresiskeycode 249 = odiaeresis Odiaeresiskeycode = udiaeresis Udiaeresiskeycode 251 = ssharp question Backslashkeycode 252 = Asciicircum Degreekeyco De 253 = 3 Sterlingkeycode 254 = Mode_switch Use the KeyCode property of the event object to determine the input key value Eg:if (event.keycode==13) {var iekey=event.keycode ;//Get key value, digital form ofvar realkey=string.fromcharcode (Iekey)//Converts the key value in digital form to the real
= odiaeresis Odiaeresiskeycode = udiaeresis Udiaeresiskeycode 251 = Ssharp ques tion Backslashkeycode 252 = asciicircum Degreekeycode 253 = 3 Sterlingkeycode 254 = Mode_switch Use the KeyCode property of the event object to determine the input key value E G:if (event.keycode==13) {var iekey=event.keycode;//gets the key value, the digital form of thevar realkey=string.fromcharcode (Iekey)//Converts the key value in digital form to the real key alert (Realkey);} Key value corresponds to table a 0
the keys on the keyboard.")Below, I press the A,B,C,D key Alone "); Input string
031
KeyPress (robot, Keyevent.vk_enter); Press ENTER to change lines
032
Robot.delay (3000); Wait 3 seconds.
033
KeyPress (robot, KEYEVENT.VK_A); Press the A key
034
Robot.delay (2000); Wait 2 seconds.
Preface: Before the understanding of the introduction of a foreign cool website, one of the sensitive website with the simultaneous holding "Q, A, p, l" to watch the video let go immediately force stop (manual squint). The actual use of this feature, I think it is possible to do some small system permissions control can be used, so as to eliminate the login and permissions-related functions.Example 1: Increase permissions while holding "~, L, J, W," at the same time1.1 JS section:Key permissions
First, you need to determine whether you want to disable the global control or the specified control. For example, I only need to disable the up and down keys of a text box.Copy codeThe Code is as follows:NoExec = function (event ){Var k = event. which | event. keyCode;If (k = 13 | k = 38 | k = 40 ){If ($ ("# atWinByArea"). attr ("id ")){If (event. which) {// FirefoxEvent. preventDefault ();} Else {// IE, C
Now there are a number of Web sites have a keyboard key to support the next page of the function, special collection and collation for your reference.
You can experience this function:
This system page support Keyboard page Direction key steering function:
Press left dir
document.onkeydown=function(){Alert (Event.keycode)//You can view the individual keysKeyCodeis how much if (Event.keycode = = //esc { event.keycode = 0; returnfalse; }JS shielded keyboard keys
LAPTOP fn key in the lower left-hand corner of the notebook keyboard, the majority of the notebook's FN key in the lower left corner of the keyboard the bottom of that key. Some notebooks put the CTRL key in the lower left corner, and FN is in the bottom row of the keyboard from the left to the second position.
fn with blue stamp, also useful green, purple, and
keyboard banging message, and the keyboard banging message has not been removed from the message queue. (The application calls the PeekMessage function and sets the PM_NOREMOVE flag). This means that when ncode equals hc_action, the hook process must process the message. In the case of Hc_noremove, the hook process must pass the message to the CALLNEXTHOOKEX
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.