// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. [ EventConstructor, ] interface KeyboardEvent : Event { // For keydown and keyup events: [InitializedByEventConstructor] readonly attribute long key; [InitializedByEventConstructor] readonly attribute DOMString location; // For keypress events: [InitializedByEventConstructor] readonly attribute long charCode; [InitializedByEventConstructor] readonly attribute boolean ctrlKey; [InitializedByEventConstructor] readonly attribute boolean shiftKey; [InitializedByEventConstructor] readonly attribute boolean altKey; [InitializedByEventConstructor] readonly attribute boolean metaKey; [InitializedByEventConstructor] readonly attribute boolean repeat; };