/* * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.javafx.scene.input; import java.util.HashMap; import java.util.Map; import javafx.scene.input.KeyCode; /** * Map from int codes to KeyCode. * Should be removed once RT-20448 is fixed. */ public final class KeyCodeMap { KeyCodeMap() { } private static final Map charMap; static { charMap = new HashMap(KeyCode.values().length); for (KeyCode c : KeyCode.values()) { charMap.put(c.impl_getCode(), c); } } public static KeyCode valueOf(int code) { return charMap.get(code); } }