Home
last modified time | relevance | path

Searched refs:ModifierKey (Results 1 – 25 of 63) sorted by relevance

123

/external/cldr/tools/java/org/unicode/cldr/draft/keyboard/test/
DModifierKeyCombinationTest.java3 import org.unicode.cldr.draft.keyboard.ModifierKey;
12 …erKeyCombination combination = ModifierKeyCombination.ofOnKeys(ImmutableSet.of(ModifierKey.SHIFT)); in testOfOnKeysForSimpleCombination()
13 ImmutableSet<ModifierKey> onKeys = ImmutableSet.of(ModifierKey.SHIFT); in testOfOnKeysForSimpleCombination()
15 ImmutableSet<ModifierKey> offKeys = ImmutableSet.of(ModifierKey.CONTROL, ModifierKey.OPTION, in testOfOnKeysForSimpleCombination()
16 ModifierKey.ALT, ModifierKey.COMMAND, ModifierKey.CAPSLOCK); in testOfOnKeysForSimpleCombination()
23 ModifierKey.SHIFT, ModifierKey.CONTROL, ModifierKey.ALT_RIGHT, ModifierKey.CAPSLOCK)); in testOfOnKeysForComplexCombination()
24 ImmutableSet<ModifierKey> onKeys = ImmutableSet.of(ModifierKey.SHIFT, ModifierKey.ALT_RIGHT, in testOfOnKeysForComplexCombination()
25 ModifierKey.CAPSLOCK, ModifierKey.CONTROL); in testOfOnKeysForComplexCombination()
27 … ImmutableSet<ModifierKey> offKeys = ImmutableSet.of(ModifierKey.ALT_LEFT, ModifierKey.OPTION, in testOfOnKeysForComplexCombination()
28 ModifierKey.COMMAND); in testOfOnKeysForComplexCombination()
[all …]
DModifierKeySimplifierTest.java5 import org.unicode.cldr.draft.keyboard.ModifierKey;
13 private static ImmutableSet<ModifierKey> EMPTY_SET = ImmutableSet.<ModifierKey> of();
18 ImmutableSet.of(ModifierKey.ALT_LEFT, ModifierKey.CAPSLOCK), in testSimplifyInputWithOverlappingSets()
19 ImmutableSet.of(ModifierKey.ALT_LEFT)); in testSimplifyInputWithOverlappingSets()
29 ImmutableSet<ModifierKey> offKeys = ImmutableSet.of(ModifierKey.CONTROL, ModifierKey.ALT, in testSimplifyInputWithBase()
30 ModifierKey.OPTION, ModifierKey.SHIFT, ModifierKey.COMMAND, ModifierKey.CAPSLOCK); in testSimplifyInputWithBase()
36 ModifierKey.ALT, ModifierKey.CAPSLOCK)); in testSimplifyInputWithParentOn()
37 ImmutableSet<ModifierKey> onKeys = ImmutableSet.of(ModifierKey.ALT, ModifierKey.CAPSLOCK); in testSimplifyInputWithParentOn()
39 ImmutableSet<ModifierKey> offKeys = ImmutableSet.of(ModifierKey.CONTROL, ModifierKey.OPTION, in testSimplifyInputWithParentOn()
40 ModifierKey.SHIFT, ModifierKey.COMMAND); in testSimplifyInputWithParentOn()
[all …]
DModifierKeyCombinationSetTest.java3 import org.unicode.cldr.draft.keyboard.ModifierKey;
15 …ifierKeyCombination combination = ModifierKeyCombination.ofOnKeys(ImmutableSet.<ModifierKey> of()); in testOfWithSingleCombination()
23 ImmutableSet.of(ModifierKey.SHIFT, ModifierKey.COMMAND), in testOfWithMultipleCombinations()
24 ImmutableSet.of(ModifierKey.CONTROL)); in testOfWithMultipleCombinations()
26 ImmutableSet.of(ModifierKey.OPTION_RIGHT, ModifierKey.CONTROL), in testOfWithMultipleCombinations()
27 ImmutableSet.of(ModifierKey.COMMAND, ModifierKey.SHIFT_LEFT)); in testOfWithMultipleCombinations()
29 … ImmutableSet.of(ModifierKey.CONTROL_LEFT, ModifierKey.CONTROL_RIGHT, ModifierKey.CAPSLOCK), in testOfWithMultipleCombinations()
30 ImmutableSet.of(ModifierKey.ALT)); in testOfWithMultipleCombinations()
41 ImmutableSet.of(ModifierKey.ALT_RIGHT, ModifierKey.COMMAND, ModifierKey.SHIFT_LEFT), in testOfWithSimplification()
42 ImmutableSet.of(ModifierKey.SHIFT_RIGHT)); in testOfWithSimplification()
[all …]
DModifierKeyTest.java3 import org.unicode.cldr.draft.keyboard.ModifierKey;
11 ModifierKey key = ModifierKey.fromString("shiftL"); in testFromString()
12 assertEquals("", ModifierKey.SHIFT_LEFT, key); in testFromString()
17 ModifierKey.fromString("bla"); in testFromStringInvalid()
25 ModifierKey key = ModifierKey.COMMAND; in testModifierKey()
26 assertEquals("", ModifierKey.COMMAND, key.sibling()); in testModifierKey()
27 assertEquals("", ModifierKey.COMMAND, key.parent()); in testModifierKey()
28 assertEquals("", ImmutableList.<ModifierKey> of(), key.children()); in testModifierKey()
32 ModifierKey key = ModifierKey.CONTROL_RIGHT; in testChildModifierKey()
33 assertEquals("", ModifierKey.CONTROL_LEFT, key.sibling()); in testChildModifierKey()
[all …]
DKeyMapTest.java8 import org.unicode.cldr.draft.keyboard.ModifierKey;
22 ImmutableSet.of(ModifierKey.CONTROL), ImmutableSet.of(ModifierKey.OPTION_RIGHT)); in createKeyMap()
23 …rKeyCombination combination2 = ModifierKeyCombination.ofOnKeys(ImmutableSet.of(ModifierKey.SHIFT)); in createKeyMap()
34 EnumSet.of(ModifierKey.CONTROL), EnumSet.of(ModifierKey.OPTION_RIGHT)); in testModifierKeyCombinationSet()
35 …difierKeyCombination combination2 = ModifierKeyCombination.ofOnKeys(EnumSet.of(ModifierKey.SHIFT)); in testModifierKeyCombinationSet()
52 ImmutableSet.of(ModifierKey.CONTROL), ImmutableSet.of(ModifierKey.OPTION_RIGHT)); in testEqualsFalse()
64 ImmutableSet.of(ModifierKey.CONTROL), ImmutableSet.of(ModifierKey.OPTION_RIGHT)); in testEqualsTrue()
65 …difierKeyCombination combination2 = ModifierKeyCombination.ofOnKeys(EnumSet.of(ModifierKey.SHIFT)); in testEqualsTrue()
77 …ierKeyCombination combination = ModifierKeyCombination.ofOnKeys(EnumSet.noneOf(ModifierKey.class)); in testCompareToGreater()
84 …ModifierKeyCombination combination = ModifierKeyCombination.ofOnKeys(EnumSet.of(ModifierKey.COMMAN… in testCompareToLess()
[all …]
DKeyboardTest.java11 import org.unicode.cldr.draft.keyboard.ModifierKey;
27 …fierKeyCombination combination1 = ModifierKeyCombination.ofOnKeys(ImmutableSet.<ModifierKey> of()); in createKeyboard()
37 …KeyCombination combination2 = ModifierKeyCombination.ofOnKeys(ImmutableSet.of(ModifierKey.OPTION)); in createKeyboard()
39 ImmutableSet.of(ModifierKey.OPTION, ModifierKey.SHIFT), in createKeyboard()
40 ImmutableSet.of(ModifierKey.CAPSLOCK)); in createKeyboard()
71 …fierKeyCombination combination1 = ModifierKeyCombination.ofOnKeys(ImmutableSet.<ModifierKey> of()); in testKeyMaps()
81 …KeyCombination combination2 = ModifierKeyCombination.ofOnKeys(ImmutableSet.of(ModifierKey.OPTION)); in testKeyMaps()
83 ImmutableSet.of(ModifierKey.OPTION, ModifierKey.SHIFT), in testKeyMaps()
84 ImmutableSet.of(ModifierKey.CAPSLOCK)); in testKeyMaps()
106 …fierKeyCombination combination1 = ModifierKeyCombination.ofOnKeys(ImmutableSet.<ModifierKey> of()); in testEqualsTrue()
[all …]
/external/cldr/tools/java/org/unicode/cldr/draft/keyboard/
DModifierKeySimplifier.java93 …public static ModifierKeyCombination simplifyInput(Set<ModifierKey> onKeys, Set<ModifierKey> dontC… in simplifyInput()
95 ImmutableSet.Builder<ModifierKey> onKeysBuilder = ImmutableSet.builder(); in simplifyInput()
96 ImmutableSet.Builder<ModifierKey> offKeysBuilder = ImmutableSet.builder(); in simplifyInput()
98 for (ModifierKey parentKey : ModifierKey.parents()) { in simplifyInput()
103 for (ModifierKey child : parentKey.children()) { in simplifyInput()
114 for (ModifierKey singleKey : ModifierKey.singles()) { in simplifyInput()
125 private static char getInputKeyState(ModifierKey modifierKey, Set<ModifierKey> onKeys, in getInputKeyState()
126 Set<ModifierKey> dontCareKeys) { in getInputKeyState()
147 ImmutableSet<ModifierKey> onKeys = combination.onKeys(); in simplifyToString()
148 ImmutableSet<ModifierKey> offKeys = combination.offKeys(); in simplifyToString()
[all …]
DModifierKeyCombination.java59 ImmutableSet.<ModifierKey> of());
61 private final ImmutableSet<ModifierKey> onKeys;
62 private final ImmutableSet<ModifierKey> offKeys;
64 …private ModifierKeyCombination(ImmutableSet<ModifierKey> onKeys, ImmutableSet<ModifierKey> offKeys… in ModifierKeyCombination()
74 public static ModifierKeyCombination ofOnKeys(Set<ModifierKey> onKeys) { in ofOnKeys()
75 return ofOnAndDontCareKeys(ImmutableSet.copyOf(onKeys), ImmutableSet.<ModifierKey> of()); in ofOnKeys()
83 public static ModifierKeyCombination ofOnAndDontCareKeys(Set<ModifierKey> onKeys, in ofOnAndDontCareKeys()
84 Set<ModifierKey> dontCareKeys) { in ofOnAndDontCareKeys()
92 static ModifierKeyCombination of(ImmutableSet<ModifierKey> onKeys, in of()
93 ImmutableSet<ModifierKey> offKeys) { in of()
[all …]
DModifierKey.java22 public enum ModifierKey { enum
29 … private static final ImmutableMap<String, ModifierKey> STRING_TO_MODIFIER_KEY = Maps.uniqueIndex(
30 Lists.newArrayList(ModifierKey.values()), Functions.toStringFunction());
31 private static final ImmutableSet<ModifierKey> PARENTS = ImmutableSet.of(CONTROL, ALT, OPTION,
33 private static final ImmutableSet<ModifierKey> SINGLES = ImmutableSet.of(COMMAND, CAPSLOCK);
38 private ModifierKey(Variant variant, String keyType) { in ModifierKey() method in ModifierKey
44 public static ModifierKey fromString(String string) { in fromString()
45 ModifierKey key = STRING_TO_MODIFIER_KEY.get(checkNotNull(string)); in fromString()
51 public static ImmutableSet<ModifierKey> parents() { in parents()
56 public static ImmutableSet<ModifierKey> singles() { in singles()
[all …]
/external/skia/modules/skplaintexteditor/app/
Deditor_application.cpp39 static SkString modifiers_desc(skui::ModifierKey m) { in modifiers_desc()
41 #define M(X) if (m & skui::ModifierKey::k ## X ##) { s.append(" {" #X "}"); } in modifiers_desc()
47 static void debug_on_char(SkUnichar c, skui::ModifierKey modifiers) { in debug_on_char()
56 static void debug_on_key(skui::Key key, skui::InputState, skui::ModifierKey modi) { in debug_on_key()
172 bool onMouseWheel(float delta, skui::ModifierKey) override { in onMouseWheel()
177 bool onMouse(int x, int y, skui::InputState state, skui::ModifierKey modifiers) override { in onMouse()
184 bool shiftOrDrag = sknonstd::Any(modifiers & skui::ModifierKey::kShift) || !mouseDown; in onMouse()
191 bool onChar(SkUnichar c, skui::ModifierKey modi) override { in onChar()
193 modi &= ~skui::ModifierKey::kFirstPress; in onChar()
194 if (!Any(modi & (skui::ModifierKey::kControl | in onChar()
[all …]
/external/skia/modules/canvaskit/
Dviewer_bindings.cpp65 enum_<skui::ModifierKey>("ModifierKey") in EMSCRIPTEN_BINDINGS()
66 .value("None", skui::ModifierKey::kNone) in EMSCRIPTEN_BINDINGS()
67 .value("Shift", skui::ModifierKey::kShift) in EMSCRIPTEN_BINDINGS()
68 .value("Control", skui::ModifierKey::kControl) in EMSCRIPTEN_BINDINGS()
69 .value("Option", skui::ModifierKey::kOption) in EMSCRIPTEN_BINDINGS()
70 .value("Command", skui::ModifierKey::kCommand) in EMSCRIPTEN_BINDINGS()
71 .value("FirstPress", skui::ModifierKey::kFirstPress); in EMSCRIPTEN_BINDINGS()
/external/cldr/tools/java/org/unicode/cldr/draft/keyboard/windows/
DKlcParser.java20 import org.unicode.cldr.draft.keyboard.ModifierKey;
114 Set<ModifierKey> modifiers = Sets.newHashSet(); in parseModifiers()
118 modifiers.add(ModifierKey.SHIFT); in parseModifiers()
120 modifiers.add(ModifierKey.ALT); in parseModifiers()
122 modifiers.add(ModifierKey.CONTROL); in parseModifiers()
125 ImmutableSet<ModifierKey> dontCareKeys = ImmutableSet.of(); in parseModifiers()
128 if (modifiers.contains(ModifierKey.ALT) || modifiers.contains(ModifierKey.CONTROL)) { in parseModifiers()
129 dontCareKeys = ImmutableSet.of(ModifierKey.CAPSLOCK); in parseModifiers()
140 if (modifiers.contains(ModifierKey.ALT) && modifiers.contains(ModifierKey.CONTROL)) { in parseModifiers()
141 Set<ModifierKey> keys = Sets.newHashSet(modifiers); in parseModifiers()
[all …]
/external/cldr/tools/java/org/unicode/cldr/draft/keyboard/osx/
DKeylayoutParser.java23 import org.unicode.cldr.draft.keyboard.ModifierKey;
146 ImmutableSet.Builder<ModifierKey> onKeys = ImmutableSet.builder(); in parseKeys()
147 ImmutableSet.Builder<ModifierKey> dontCareKeys = ImmutableSet.builder(); in parseKeys()
151 ImmutableSet.Builder<ModifierKey> builder = maybe ? dontCareKeys : onKeys; in parseKeys()
153 builder.add(ModifierKey.COMMAND); in parseKeys()
155 builder.add(ModifierKey.CAPSLOCK); in parseKeys()
157 builder.add(ModifierKey.SHIFT); in parseKeys()
159 builder.add(ModifierKey.SHIFT_LEFT); in parseKeys()
161 builder.add(ModifierKey.SHIFT_RIGHT); in parseKeys()
163 builder.add(ModifierKey.OPTION); in parseKeys()
[all …]
/external/skia/tools/sk_app/mac/
DWindow_mac.mm13 #include "tools/skui/ModifierKey.h"
244 static skui::ModifierKey get_modifiers(const NSEvent* event) {
246 skui::ModifierKey modifiers = skui::ModifierKey::kNone;
249 modifiers |= skui::ModifierKey::kCommand;
252 modifiers |= skui::ModifierKey::kShift;
255 modifiers |= skui::ModifierKey::kControl;
258 modifiers |= skui::ModifierKey::kOption;
262 modifiers |= skui::ModifierKey::kFirstPress;
274 skui::ModifierKey fLastModifiers;
328 - (skui::ModifierKey) updateModifierKeys:(NSEvent*) event {
[all …]
/external/skia/tools/sk_app/
DWindow.h97 virtual bool onChar(SkUnichar c, skui::ModifierKey) { return false; } in onChar() argument
98 virtual bool onKey(skui::Key, skui::InputState, skui::ModifierKey) { return false; } in onKey() argument
99 virtual bool onMouse(int x, int y, skui::InputState, skui::ModifierKey) { return false; } in onMouse() argument
100 virtual bool onMouseWheel(float delta, skui::ModifierKey) { return false; } in onMouseWheel() argument
121 bool onChar(SkUnichar c, skui::ModifierKey modifiers);
122 bool onKey(skui::Key key, skui::InputState state, skui::ModifierKey modifiers);
123 bool onMouse(int x, int y, skui::InputState state, skui::ModifierKey modifiers);
124 bool onMouseWheel(float delta, skui::ModifierKey modifiers);
DWindow.cpp43 bool Window::onChar(SkUnichar c, skui::ModifierKey modifiers) { in onChar()
47 bool Window::onKey(skui::Key key, skui::InputState state, skui::ModifierKey modifiers) { in onKey()
51 bool Window::onMouse(int x, int y, skui::InputState state, skui::ModifierKey modifiers) { in onMouse()
55 bool Window::onMouseWheel(float delta, skui::ModifierKey modifiers) { in onMouseWheel()
DCommandSet.h44 bool onKey(skui::Key key, skui::InputState state, skui::ModifierKey modifiers);
45 bool onChar(SkUnichar, skui::ModifierKey modifiers);
/external/skia/tools/sk_app/win/
DWindow_win.cpp163 static skui::ModifierKey get_modifiers(UINT message, WPARAM wParam, LPARAM lParam) { in get_modifiers()
164 skui::ModifierKey modifiers = skui::ModifierKey::kNone; in get_modifiers()
170 modifiers |= skui::ModifierKey::kFirstPress; in get_modifiers()
173 modifiers |= skui::ModifierKey::kOption; in get_modifiers()
180 modifiers |= skui::ModifierKey::kFirstPress; in get_modifiers()
183 modifiers |= skui::ModifierKey::kOption; in get_modifiers()
190 modifiers |= skui::ModifierKey::kOption; in get_modifiers()
199 modifiers |= skui::ModifierKey::kControl; in get_modifiers()
202 modifiers |= skui::ModifierKey::kShift; in get_modifiers()
/external/skia/samplecode/
DSample.h68 skui::ModifierKey fModifierKeys = skui::ModifierKey::kNone;
74 bool mouse(SkPoint point, skui::InputState clickState, skui::ModifierKey modifierKeys);
86 virtual Click* onFindClickHandler(SkScalar x, SkScalar y, skui::ModifierKey modi);
DSample.cpp64 bool Sample::mouse(SkPoint point, skui::InputState clickState, skui::ModifierKey modifierKeys) { in mouse()
114 Sample::Click* Sample::onFindClickHandler(SkScalar x, SkScalar y, skui::ModifierKey modi) { in onFindClickHandler()
/external/skia/tools/skui/
DModifierKey.h9 enum class ModifierKey { enum
20 template <> struct is_bitmask_enum<skui::ModifierKey> : std::true_type {};
/external/skia/tools/viewer/
DImGuiLayer.h129 bool onMouse(int x, int y, skui::InputState state, skui::ModifierKey modifiers) override;
130 bool onMouseWheel(float delta, skui::ModifierKey modifiers) override;
131 bool onKey(skui::Key key, skui::InputState state, skui::ModifierKey modifiers) override;
132 bool onChar(SkUnichar c, skui::ModifierKey modifiers) override;
DViewer.h42 bool onMouse(int x, int y, skui::InputState state, skui::ModifierKey modifiers) override;
44 bool onKey(skui::Key key, skui::InputState state, skui::ModifierKey modifiers) override;
45 bool onChar(SkUnichar c, skui::ModifierKey modifiers) override;
/external/skia/tools/sk_app/ios/
DWindow_ios.mm157 skui::InputState::kDown, skui::ModifierKey::kNone);
161 skui::InputState::kMove, skui::ModifierKey::kNone);
165 skui::InputState::kUp, skui::ModifierKey::kNone);
169 skui::InputState::kUp, skui::ModifierKey::kNone);
181 skui::InputState::kDown, skui::ModifierKey::kNone);
183 skui::InputState::kUp, skui::ModifierKey::kNone);
/external/skia/tools/sk_app/unix/
DWindow_unix.cpp234 static skui::ModifierKey get_modifiers(const XEvent& event) { in get_modifiers()
237 skui::ModifierKey fSkMask; in get_modifiers()
239 { ShiftMask, skui::ModifierKey::kShift }, in get_modifiers()
240 { ControlMask, skui::ModifierKey::kControl }, in get_modifiers()
241 { Mod1Mask, skui::ModifierKey::kOption }, in get_modifiers()
244 skui::ModifierKey modifiers = skui::ModifierKey::kNone; in get_modifiers()

123