Author: DartPeng
Date: 2010-04-12 01:49:22 -0400 (Mon, 12 Apr 2010)
New Revision: 21434
Modified:
workspace/dart/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/test/KeyPressHelper.java
Log:
Modified:
workspace/dart/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/test/KeyPressHelper.java
===================================================================
---
workspace/dart/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/test/KeyPressHelper.java 2010-04-12
05:32:08 UTC (rev 21433)
+++
workspace/dart/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/test/KeyPressHelper.java 2010-04-12
05:49:22 UTC (rev 21434)
@@ -20,14 +20,22 @@
*/
public class KeyPressHelper {
public static void pressSingleKeyCode(int keyCode) {
- SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
+ String kl = "EN_US";
+ if (System.getProperty("os.name").toLowerCase().indexOf("mac") !=
-1) {
+ kl = "MAC_EN_US";
+ }
+ SWTBotPreferences.KEYBOARD_LAYOUT = kl;
KeyboardFactory.getSWTKeyboard().pressShortcut(Keystrokes.DELETE);
}
-
+
public static void pressCompositeKeyCode(int stateMask, char c) {
+ String kl = "EN_US";
+ if (System.getProperty("os.name").toLowerCase().indexOf("mac") !=
-1) {
+ kl = "MAC_EN_US";
+ }
+ SWTBotPreferences.KEYBOARD_LAYOUT = kl;
+ KeyboardFactory.getSWTKeyboard().pressShortcut(stateMask, c);
+ }
- SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
- KeyboardFactory.getSWTKeyboard().pressShortcut(stateMask,c);
- }
}