From 1109132f09d75da9a28b649c7677bb6ce07c40c0 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:45 -0500 Subject: initial commit --- files/es/web/api/mouseevent/shiftkey/index.html | 126 ++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 files/es/web/api/mouseevent/shiftkey/index.html (limited to 'files/es/web/api/mouseevent/shiftkey/index.html') diff --git a/files/es/web/api/mouseevent/shiftkey/index.html b/files/es/web/api/mouseevent/shiftkey/index.html new file mode 100644 index 0000000000..7f2fc25d61 --- /dev/null +++ b/files/es/web/api/mouseevent/shiftkey/index.html @@ -0,0 +1,126 @@ +--- +title: MouseEvent.shiftKey +slug: Web/API/MouseEvent/shiftKey +translation_of: Web/API/MouseEvent/shiftKey +--- +

{{APIRef("DOM Events")}}

+ +

El evento de MouseEvent.shiftKey es una propiedad de solo lectura que indica si la tecla de shift se presionó (true) o no (false).

+ +

Sintaxis

+ +
var shiftKeyPressed = instanceOfMouseEvent.shiftKey
+
+ +

Valor que retorna

+ +

Un valor booleano

+ +

Ejemplo

+ +
<html>
+<head>
+<title>Ejemplo de shiftKey</title>
+
+<script type="text/javascript">
+
+function showChar(e){
+  alert(
+    "Tecla presionada: " + String.fromCharCode(e.charCode) + "\n"
+    + "charCode: " + e.charCode + "\n"
+    + "SHIFT presionada: " + e.shiftKey + "\n"
+    + "ALT presionado: " + e.altKey + "\n"
+  );
+}
+
+</script>
+</head>
+
+<body onkeypress="showChar(event);">
+<p>Presione cualquier tecla, con o sin la tecla SHIFT.<br />
+También puede utilizar SHIFT junto a la tecla ALT.</p>
+</body>
+</html>
+
+ +

Especificación

+ + + + + + + + + + + + + + + + + + + +
EspecificaciónEstadoComentario
{{SpecName('DOM3 Events','#widl-MouseEvent-shiftKey','MouseEvent.shiftKey')}}{{Spec2('DOM3 Events')}}Sin cambios desde {{SpecName('DOM2 Events')}}.
{{SpecName('DOM2 Events','#Events-MouseEvent','MouseEvent.shiftKey')}}{{Spec2('DOM2 Events')}}Primera definición.
+ +

Compatibilidad con navegadores

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaEdgeFirefox (Gecko)ChromeInternet ExplorerOperaSafari
Soporte Básico{{CompatVersionUnknown}}{{CompatVersionUnknown()}}{{CompatVersionUnknown()}}{{CompatVersionUnknown()}}{{CompatVersionUnknown()}}{{CompatVersionUnknown()}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaEdgeFirefox Mobile (Gecko)AndroidIE MobileOpera MobileSafari Mobile
Soporte Básico{{CompatVersionUnknown}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
+
+ +

Ver más

+ + -- cgit v1.2.3-54-g00ecf