lib/keyboard-parser.js
function parseModifiers(packet, bits) {
  /* eslint-disable no-bitwise */
  /* eslint-disable no-param-reassign */
  packet.modifiers.l_control = ((bits & 1) !== 0);
  packet.modifiers.l_shift = ((bits & 2) !== 0);
  packet.modifiers.l_alt = ((bits & 4) !== 0);
  packet.modifiers.l_meta = ((bits & 8) !== 0);
  packet.modifiers.r_control = ((bits & 16) !== 0);
  packet.modifiers.r_shift = ((bits & 32) !== 0);
  packet.modifiers.r_alt = ((bits & 64) !== 0);
  packet.modifiers.r_meta = ((bits & 128) !== 0);
  /* eslint-enable no-bitwise */
  /* eslint-enable no-param-reassign */
}
function parseModifiers(packet, bits) {
  /* eslint-disable no-bitwise */
  /* eslint-disable no-param-reassign */
  packet.modifiers.l_control = ((bits & 1) !== 0);
  packet.modifiers.l_shift = ((bits & 2) !== 0);
  packet.modifiers.l_alt = ((bits & 4) !== 0);
  packet.modifiers.l_meta = ((bits & 8) !== 0);
  packet.modifiers.r_control = ((bits & 16) !== 0);
  packet.modifiers.r_shift = ((bits & 32) !== 0);
  packet.modifiers.r_alt = ((bits & 64) !== 0);
  packet.modifiers.r_meta = ((bits & 128) !== 0);
  /* eslint-enable no-bitwise */
  /* eslint-enable no-param-reassign */
}
function parseModifiers ( packet , bits ) { /* eslint-disable no-bitwise */ /* eslint-disable no-param-reassign */ packet . modifiers . l_control = ( ( bits & 1 ) !== 0 ) ; packet . modifiers . l_shift = ( ( bits & 2 ) !== 0 ) ; packet . modifiers . l_alt = ( ( bits & 4 ) !== 0 ) ; packet . modifiers . l_meta = ( ( bits & 8 ) !== 0 ) ; packet . modifiers . r_control = ( ( bits & 16 ) !== 0 ) ; packet . modifiers . r_shift = ( ( bits & 32 ) !== 0 ) ; packet . modifiers . r_alt = ( ( bits & 64 ) !== 0 ) ; packet . modifiers . r_meta = ( ( bits & 128 ) !== 0 ) ; /* eslint-enable no-bitwise */ /* eslint-enable no-param-reassign */ }
Convert modifier key bits into
array of human-readable identifiers
Convert modifier key bits into array of human - readable identifiers