| Revision 1328,
1.0 KB
checked in by naka, 20 years ago
(diff) |
|
* empty log message *
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | /* |
|---|
| 2 | * Access Key Utilities |
|---|
| 3 | * |
|---|
| 4 | * |
|---|
| 5 | * Copyright (c) 2003-2004 DRECOM CO.,LTD. All rights reserved. |
|---|
| 6 | * |
|---|
| 7 | * [email protected] |
|---|
| 8 | * http://www.drecom.co.jp/ |
|---|
| 9 | */ |
|---|
| 10 | |
|---|
| 11 | /** |
|---|
| 12 | * Û¶V[gJbgðLøÉ·é©Ç¤©B |
|---|
| 13 | * V[gJbgæèàæÉAuEUÌÛ¶_CAOªoéêͳøÉ·éB |
|---|
| 14 | * |
|---|
| 15 | * @return Û¶V[gJbgðLøÉ·é©Ç¤© |
|---|
| 16 | */ |
|---|
| 17 | function shortCutSupported() |
|---|
| 18 | { |
|---|
| 19 | return (document.all != null && null == XBSUtil.opera); |
|---|
| 20 | } |
|---|
| 21 | |
|---|
| 22 | function access_key_onkeydown_hock(theEvent) |
|---|
| 23 | { |
|---|
| 24 | if (false == shortCutSupported()) { |
|---|
| 25 | return true; |
|---|
| 26 | } |
|---|
| 27 | |
|---|
| 28 | if (theEvent == null) { |
|---|
| 29 | theEvent = window.event; |
|---|
| 30 | } |
|---|
| 31 | var willCancel = false; |
|---|
| 32 | var k = XBSEvent.getKeyCode(theEvent); |
|---|
| 33 | var m = XBSEvent.getModifierFlags(theEvent); |
|---|
| 34 | if (m & XBSEvent.CONTROL_KEY_MASK){ |
|---|
| 35 | if (k == 83) { // 's' |
|---|
| 36 | execSave != null ? execSave() : void(0); |
|---|
| 37 | willCancel = true; |
|---|
| 38 | } |
|---|
| 39 | } else if (m & XBSEvent.ALT_KEY_MASK){ |
|---|
| 40 | if (k == 80) { // 'p' |
|---|
| 41 | execPrint != null ? execPrint() : void(0); |
|---|
| 42 | willCancel = true; |
|---|
| 43 | } |
|---|
| 44 | } |
|---|
| 45 | if (willCancel) { |
|---|
| 46 | theEvent.returnValue = false; |
|---|
| 47 | return false; |
|---|
| 48 | } |
|---|
| 49 | |
|---|
| 50 | return true; |
|---|
| 51 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.