All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.webswing.model.c2s.KeyboardEventMsgIn Maven / Gradle / Ivy

There is a newer version: 20.2.4
Show newest version
package org.webswing.model.c2s;

import org.webswing.model.MsgIn;
import org.webswing.model.UserInputMsgIn;

public class KeyboardEventMsgIn implements MsgIn,UserInputMsgIn {

	private static final long serialVersionUID = -896095456169586882L;

	public enum KeyEventType {
		keypress, keydown, keyup;
	}

	private KeyEventType type;
	private int character;
	private int keycode;
	private boolean alt;
	private boolean ctrl;
	private boolean shift;
	private boolean meta;

	public KeyEventType getType() {
		return type;
	}

	public void setType(KeyEventType type) {
		this.type = type;
	}

	public int getCharacter() {
		return character;
	}

	public void setCharacter(int character) {
		this.character = character;
	}

	public int getKeycode() {
		return keycode;
	}

	public void setKeycode(int keycode) {
		this.keycode = keycode;
	}

	public boolean isAlt() {
		return alt;
	}

	public void setAlt(boolean alt) {
		this.alt = alt;
	}

	public boolean isCtrl() {
		return ctrl;
	}

	public void setCtrl(boolean ctrl) {
		this.ctrl = ctrl;
	}

	public boolean isShift() {
		return shift;
	}

	public void setShift(boolean shift) {
		this.shift = shift;
	}

	public boolean isMeta() {
		return meta;
	}

	public void setMeta(boolean meta) {
		this.meta = meta;
	}

	public boolean isAltgr() {
		return false; //not supported by browsers
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy