< prev index next >

test/jdk/java/awt/event/KeyEvent/ExtendedModifiersTest/ExtendedModifiersTest.java

Print this page
rev 59383 : [mq]: final
   1 /*
   2  * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */


 230             runScenario(new int[]{KeyEvent.VK_SHIFT, KeyEvent.VK_CONTROL},
 231                     InputEvent.SHIFT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK);
 232 
 233             // 2. alt + shift + control
 234             runScenario(new int[]{KeyEvent.VK_ALT, KeyEvent.VK_SHIFT,
 235                 KeyEvent.VK_CONTROL}, InputEvent.ALT_DOWN_MASK
 236                     | InputEvent.SHIFT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK);
 237 
 238             // 3. shift
 239             runScenario(new int[]{KeyEvent.VK_SHIFT},
 240                     InputEvent.SHIFT_DOWN_MASK);
 241 
 242             // 4. alt + control
 243             runScenario(new int[]{KeyEvent.VK_ALT, KeyEvent.VK_CONTROL},
 244                     InputEvent.ALT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK);
 245 
 246             // 5. shift + alt
 247             runScenario(new int[]{KeyEvent.VK_SHIFT, KeyEvent.VK_ALT},
 248                     InputEvent.SHIFT_DOWN_MASK | InputEvent.ALT_DOWN_MASK);
 249 
 250             if (OS.contains("os x") || OS.contains("sunos")) {
 251                 // 6. meta
 252                 runScenario(new int[]{KeyEvent.VK_META},
 253                         InputEvent.META_DOWN_MASK);
 254 
 255                 // 7. shift + ctrl + alt + meta
 256                 runScenario(new int[]{KeyEvent.VK_SHIFT, KeyEvent.VK_CONTROL,
 257                     KeyEvent.VK_ALT, KeyEvent.VK_META},
 258                         InputEvent.SHIFT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK
 259                         | InputEvent.ALT_DOWN_MASK | InputEvent.META_DOWN_MASK);
 260 
 261                 // 8. meta + shift + ctrl
 262                 runScenario(new int[]{KeyEvent.VK_META, KeyEvent.VK_SHIFT,
 263                     KeyEvent.VK_CONTROL}, InputEvent.META_DOWN_MASK
 264                       | InputEvent.SHIFT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK);
 265 
 266                 // 9. meta + shift + alt
 267                 runScenario(new int[]{KeyEvent.VK_META, KeyEvent.VK_SHIFT,
 268                     KeyEvent.VK_ALT}, InputEvent.META_DOWN_MASK
 269                       | InputEvent.SHIFT_DOWN_MASK | InputEvent.ALT_DOWN_MASK);
 270 
   1 /*
   2  * Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */


 230             runScenario(new int[]{KeyEvent.VK_SHIFT, KeyEvent.VK_CONTROL},
 231                     InputEvent.SHIFT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK);
 232 
 233             // 2. alt + shift + control
 234             runScenario(new int[]{KeyEvent.VK_ALT, KeyEvent.VK_SHIFT,
 235                 KeyEvent.VK_CONTROL}, InputEvent.ALT_DOWN_MASK
 236                     | InputEvent.SHIFT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK);
 237 
 238             // 3. shift
 239             runScenario(new int[]{KeyEvent.VK_SHIFT},
 240                     InputEvent.SHIFT_DOWN_MASK);
 241 
 242             // 4. alt + control
 243             runScenario(new int[]{KeyEvent.VK_ALT, KeyEvent.VK_CONTROL},
 244                     InputEvent.ALT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK);
 245 
 246             // 5. shift + alt
 247             runScenario(new int[]{KeyEvent.VK_SHIFT, KeyEvent.VK_ALT},
 248                     InputEvent.SHIFT_DOWN_MASK | InputEvent.ALT_DOWN_MASK);
 249 
 250             if (OS.contains("os x")) {
 251                 // 6. meta
 252                 runScenario(new int[]{KeyEvent.VK_META},
 253                         InputEvent.META_DOWN_MASK);
 254 
 255                 // 7. shift + ctrl + alt + meta
 256                 runScenario(new int[]{KeyEvent.VK_SHIFT, KeyEvent.VK_CONTROL,
 257                     KeyEvent.VK_ALT, KeyEvent.VK_META},
 258                         InputEvent.SHIFT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK
 259                         | InputEvent.ALT_DOWN_MASK | InputEvent.META_DOWN_MASK);
 260 
 261                 // 8. meta + shift + ctrl
 262                 runScenario(new int[]{KeyEvent.VK_META, KeyEvent.VK_SHIFT,
 263                     KeyEvent.VK_CONTROL}, InputEvent.META_DOWN_MASK
 264                       | InputEvent.SHIFT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK);
 265 
 266                 // 9. meta + shift + alt
 267                 runScenario(new int[]{KeyEvent.VK_META, KeyEvent.VK_SHIFT,
 268                     KeyEvent.VK_ALT}, InputEvent.META_DOWN_MASK
 269                       | InputEvent.SHIFT_DOWN_MASK | InputEvent.ALT_DOWN_MASK);
 270 
< prev index next >