| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 else if ("rightControl" == codeStr) | 595 else if ("rightControl" == codeStr) |
| 596 code = VKEY_RCONTROL; | 596 code = VKEY_RCONTROL; |
| 597 else if ("leftShift" == codeStr) | 597 else if ("leftShift" == codeStr) |
| 598 code = VKEY_LSHIFT; | 598 code = VKEY_LSHIFT; |
| 599 else if ("rightShift" == codeStr) | 599 else if ("rightShift" == codeStr) |
| 600 code = VKEY_RSHIFT; | 600 code = VKEY_RSHIFT; |
| 601 else if ("leftAlt" == codeStr) | 601 else if ("leftAlt" == codeStr) |
| 602 code = VKEY_LMENU; | 602 code = VKEY_LMENU; |
| 603 else if ("rightAlt" == codeStr) | 603 else if ("rightAlt" == codeStr) |
| 604 code = VKEY_RMENU; | 604 code = VKEY_RMENU; |
| 605 else if ("numLock" == codeStr) |
| 606 code = VKEY_NUMLOCK; |
| 605 else { | 607 else { |
| 606 // Compare the input string with the function-key names defined by the | 608 // Compare the input string with the function-key names defined by the |
| 607 // DOM spec (i.e. "F1",...,"F24"). If the input string is a function-key | 609 // DOM spec (i.e. "F1",...,"F24"). If the input string is a function-key |
| 608 // name, set its key code. | 610 // name, set its key code. |
| 609 for (int i = 1; i <= 24; ++i) { | 611 for (int i = 1; i <= 24; ++i) { |
| 610 char functionChars[10]; | 612 char functionChars[10]; |
| 611 snprintf(functionChars, 10, "F%d", i); | 613 snprintf(functionChars, 10, "F%d", i); |
| 612 string functionKeyName(functionChars); | 614 string functionKeyName(functionChars); |
| 613 if (functionKeyName == codeStr) { | 615 if (functionKeyName == codeStr) { |
| 614 code = VKEY_F1 + (i - 1); | 616 code = VKEY_F1 + (i - 1); |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1390 { | 1392 { |
| 1391 result->setNull(); | 1393 result->setNull(); |
| 1392 } | 1394 } |
| 1393 | 1395 |
| 1394 void EventSender::clearKillRing(const CppArgumentList&, CppVariant* result) | 1396 void EventSender::clearKillRing(const CppArgumentList&, CppVariant* result) |
| 1395 { | 1397 { |
| 1396 result->setNull(); | 1398 result->setNull(); |
| 1397 } | 1399 } |
| 1398 | 1400 |
| 1399 } | 1401 } |
| OLD | NEW |