Role of shiftKey Mouse Event in JavaScript

Rishi Rathor
Updated on 23-May-2020 09:29:49

218 Views

The shiftkey mouse event property is used to show whether SHIFT key is pressed or not when mouse button is clicked.ExampleYou can try to run the following code to learn how to implement shiftKey Mouse event in JavaScript.           Press and hold SHIFT key and then click here.                function funcShiftKey(event) {             if (event.shiftKey) {                alert("SHIFT key: Pressed");             } else {                alert("SHIFT key: NOT Pressed");             }          }          

Role of clientY Mouse Event in JavaScript

Ramu Prasad
Updated on 23-May-2020 09:17:56

170 Views

When a mouse event is triggered, the clientY mouse event property is used to get the vertical coordinate of the mouse pointer. This is according to the current window.ExampleYou can try to run the following code to learn how to implement clientY Mouse event in JavaScript.           Click here to get the x (horizontal) and y (vertical) coordinates (according to current window) of the mouse pointer.                      function coordsFunc(event) {             var x_coord = event.clientX;             var y_coord = event.clientY;             var xycoords = "X coords= " + x_coord + ", Y coords = " + y_coord;             document.write(xycoords);          }          

Role of clientX Mouse Event in JavaScript

Nancy Den
Updated on 23-May-2020 09:17:15

396 Views

When a mouse event is triggered, the clientX mouse event property is used to get the horizontal coordinate of the mouse pointer. This is according to current window.ExampleYou can try to run the following code to learn how to implement clientX Mouse event in JavaScript.                    Click here to get the x (horizontal) and y (vertical) coordinates          (according to current window) of the mouse pointer.                      function coordsFunc(event) {             var x_coord = event.clientX;             var y_coord = event.clientY;             var xycoords = "X coords= " + x_coord + ", Y coords= " + y_coord;             document.write(xycoords);          }          

Convert to Number in JavaScript

Lakshmi Srinivas
Updated on 23-May-2020 09:15:26

207 Views

Use the Number() method in JavaScript to convert to Number. You can try to run the following code to learn how to convert [ ] to Number in JavaScript.ExampleLive Demo           Convert [] to Number                var myVal = [];          document.write("Number: " + Number(myVal));          

JavaScript Event for Pasted Content in an Element

Vrundesha Joshi
Updated on 23-May-2020 09:14:49

137 Views

The onpaste event occurs when you paste content in the element.ExampleYou can try to run the following code to learn how to work with onpaste event in JavaScript.                          function pasteFunction() {             document.write("Text pasted successfully!");          }          

Role of altKey Mouse Event in JavaScript

Sravani S
Updated on 23-May-2020 09:13:53

226 Views

The altkey mouse event property is used to show whether SHIFT key is pressed or not when mouse button is clicked.ExampleYou can try to run the following code to learn how to implement altKey Mouse event in JavaScript.           Press and hold ALT key and then click here.                function funcAltKey(event) {             if (event.altKey) {                alert("ALT key: Pressed");             } else {                alert("ALT key: NOT Pressed");             }          }          

JavaScript Clipboard Copy Event

Nitya Raut
Updated on 23-May-2020 09:12:11

136 Views

When a user copies the element’s content, then the oncopy event triggers.ExampleYou can try to run the following code to learn how to implement oncopy event in JavaScript.                          function copyFunction() {             document.write("Text copied!");          }          

Bluetooth Usage and Applications

Moumita
Updated on 22-May-2020 11:56:10

15K+ Views

Bluetooth is a network technology that connects mobile devices wirelessly over a short-range to form a personal area network (PAN). They use short-wavelength, ultra-high frequency (UHF) radio waves within the range 2.400 to 2.485 GHz, for wireless communications.Bluetooth UsageUsage of Bluetooth can be broadly categorized into three areas −Access Points for Data and Voice − Real-time voice and data transmissions are provided by Bluetooth by connecting portable and stationary network devices wirelessly.Cable replacement − Bluetooth replaces the need for a large number of wires and cables of wired networks. The connections can be made instantly and are retained even when ... Read More

Logical Link Control and Adaptation Protocol (L2CAP)

Moumita
Updated on 22-May-2020 11:53:03

7K+ Views

Logical Link Control and Adaptation Protocol (L2CAP) is a protocol used in the Bluetooth standard that provides adaption between higher layers and the baseband layer of the Bluetooth stack. It operates just above the host-controller interface (HCI) passing data frames from the higher layers to either HCI or Link Manager.The following diagram shows the position of L2CAP in Bluetooth protocol architecture −Functions of L2CAPAdaptation between higher-layer frames and lower layer frames of the Bluetooth protocol stack.Support for both connection-oriented as well as connectionless services.Supporting two links for the Baseband layer −Synchronous Connection-Oriented (SCO) links for real-time voice traffic using reserved ... Read More

The Bluetooth Radio Layer

Moumita
Updated on 22-May-2020 11:51:06

3K+ Views

The Bluetooth radio layer is the lowest layer of Bluetooth architecture that corresponds to the physical layer of the OSI model. It lays down the physical structure and specifications for the transmission of radio waves.The position of the radio layer depicted in the following diagram −Characteristic Features of Bluetooth Radio LayerThe Bluetooth radio layer lays down the requirements of the Bluetooth transceiver device that communicates using Bluetooth technology.It defines air interface, frequency bands, frequency hopping specifications, and modulation techniques.This layer is responsible for moving data bits from the master device to the slave device, and vice versa.It is a low-power ... Read More

Advertisements