23 package com.realtime.crossfire.jxclient.gui.keybindings;
28 import java.io.IOException;
29 import java.nio.file.Path;
31 import java.util.TreeMap;
32 import java.util.function.Predicate;
33 import org.jetbrains.annotations.NotNull;
34 import org.jetbrains.annotations.Nullable;
52 public static final String
GLOBAL =
"g";
149 if (bindings ==
null) {
178 }
catch (
final IOException ex) {
180 System.err.println(
"Cannot read keybindings file for "+character+
" on "+hostname+
": "+ex.getMessage());
287 public Map<KeyBinding, String>
getBindings(@NotNull
final Predicate<KeyBinding> predicate) {
288 final Map<KeyBinding, String> matches =
new TreeMap<>();
300 boolean used =
false;
302 if (check.equals(candidate)) {
308 matches.put(candidate,
GLOBAL);
313 boolean used =
false;
315 if (check.equals(candidate)) {
321 matches.put(candidate,
DEFAULT);