// Function: enables the user to automatically jump to the next control by pressing enter on the webpage. right-clicking and other shortcut keys are prohibited.
// Method: Use the HTC component and the CSS file to bind the keydown event of the body to the custom function.
// Author: waxdoll Cheung
// Time:
// Memo: This is my first HTC file.
<Public: component lightweight = false>
<Public: attach event = "onkeydown" onevent = "enter2tab ()"/>
<Public: attach event = "oncontextmenu" onevent = "nocm ()"/>
<Public: attach event = "onhelp" onevent = "nohelp ()"/>
<Script language = "JavaScript">
Function enter2tab ()
{
// Press the Enter key to jump to the next input control
If (event. keycode = 13)
Event. keycode = 9;
/// Mask Alt + direction keys ↓ and ALT + direction keys →
If (window. event. altkey) & (window. event. keycode = 37) | (window. event. keycode = 39 )))
Event. returnvalue = false;
// Shield unrefresh key, F5 refresh key, CTRL + R, F11, CTRL + N, Shift + F10
If (event. keycode = 8) | (event. keycode = 116) | (event. ctrlkey & event. keycode = 82) | (event. keycode = 122) | (event. ctrlkey & event. keycode = 78) | (event. shiftkey & event. keycode = 121 ))
{
Event. keycode = 0;
Event. returnvalue = false;
}
// Block Alt + F4
If (window. event. altkey) & (window. event. keycode = 115 ))
Return false;
// Block shift and use the left mouse button to open a new webpage
If (window. event. srcelement. tagname = "A" & window. event. shiftkey)
Window. event. returnvalue = false;
}
// Shield the right-click menu
Function nocm ()
{
Event. returnvalue = false;
}
// Block the F1 key
Function nohelp ()
{
Return false;
}
</SCRIPT>
</Public: component>