blob: 6ab85012298b6cc9b7fa8dd878630a2e382e0195 [file] [log] [blame]
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
part of $LIBRARYNAME;
$(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME(String type,
{Window view, bool canBubble: true, bool cancelable: true,
int keyLocation: 1, bool ctrlKey: false,
bool altKey: false, bool shiftKey: false, bool metaKey: false,
bool altGraphKey: false}) {
if (view == null) {
view = window;
}
final e = document._createEvent("KeyboardEvent");
e._initKeyboardEvent(type, canBubble, cancelable, view, "",
keyLocation, ctrlKey, altKey, shiftKey, metaKey, altGraphKey);
return e;
}
@DomName('KeyboardEvent.keyCode')
int get keyCode => _keyCode;
@DomName('KeyboardEvent.charCode')
int get charCode => _charCode;
$!MEMBERS
}