Package org.jnode.driver.input

Examples of org.jnode.driver.input.KeyboardInterpreter


     * @param pressed true=key pressed, false=key released
     */
    private void sendKeyboardEvent(int keycode, boolean pressed) {
        final KeyboardHandler kbHandler = getToolkitImpl().getKeyboardHandler();
        final KeyboardAPI api = kbHandler.getKeyboardAPI();
        final KeyboardInterpreter kbInt = api.getKbInterpreter();
        final KeyboardEvent event = kbInt.interpretKeycode(keycode);
        if (event != null) {
            if (pressed)
                kbHandler.keyPressed(event);
            else
                kbHandler.keyReleased(event);
View Full Code Here


        } else if (argSet.isSet()) {
            String layoutID = getLayoutID(mgr);
            for (Device kb : kbDevs) {
                final KeyboardAPI api = kb.getAPI(KeyboardAPI.class);
                try {
                    final KeyboardInterpreter kbInt = mgr.createKeyboardInterpreter(layoutID);
                    out.format(fmt_set_interp, kb.getId(), kbInt.getClass().getName());
                    api.setKbInterpreter(kbInt);
                } catch (KeyboardInterpreterException ex) {
                    err.format(ex_set_interp, kb.getId(), ex.getLocalizedMessage());
                    // Re-throw the exception so that the shell can decide whether or not
                    // to print a stacktrace.
View Full Code Here

     *
     * @param value
     */
    public void process(byte value) throws Exception {
        final int keyCode = value & 0xFF;
        final KeyboardInterpreter intp = apiAdapter.getKbInterpreter();
        apiAdapter.fireEvent(intp.interpretScancode(keyCode));
    }
View Full Code Here

TOP

Related Classes of org.jnode.driver.input.KeyboardInterpreter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.