001package gwt.material.design.jquery.client.api; 002 003/* 004 * #%L 005 * GwtMaterial 006 * %% 007 * Copyright (C) 2015 - 2017 GwtMaterialDesign 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023import jsinterop.annotations.JsConstructor; 024import jsinterop.annotations.JsOverlay; 025import jsinterop.annotations.JsProperty; 026import jsinterop.annotations.JsType; 027 028/** 029 * KeyEvent for JQuery. 030 * 031 * @author Ben Dol 032 */ 033@JsType(namespace = "jQuery", name = "Event", isNative=true) 034public class KeyEvent extends Event { 035 036 public KeyEvent(String type) { 037 super(type); 038 } 039 040 @JsProperty 041 public int which; 042 043 @JsOverlay 044 public final int getWhich() { 045 return which; 046 } 047 048 @JsProperty 049 public int keyCode; 050 051 @JsOverlay 052 public final int getKeyCode() { 053 return keyCode; 054 } 055 056 @JsProperty 057 public String charCode; 058 059 @JsOverlay 060 public final String getCharCode() { 061 return charCode; 062 } 063 064 @JsProperty 065 public boolean shiftKey; 066 067 @JsOverlay 068 public final boolean isShiftKey() { 069 return shiftKey; 070 } 071 072 @JsProperty 073 public boolean ctrlKey; 074 075 @JsOverlay 076 public final boolean isCtrlKey() { 077 return ctrlKey; 078 } 079 080 @JsProperty 081 public boolean altKey; 082 083 @JsOverlay 084 public final boolean isAltKey() { 085 return altKey; 086 } 087 088 @JsProperty 089 public boolean cancelable; 090 091 @JsOverlay 092 public final boolean isCancelable() { 093 return cancelable; 094 } 095 096 @JsProperty 097 public boolean bubbles; 098 099 @JsOverlay 100 public final boolean isBubbles() { 101 return bubbles; 102 } 103}