VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /var/www/html/libs/absol-full/dist/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/libs/absol-full/dist/js/mdls__absol__src__Input__keyboard.js
/*** module: node_modules/absol/src/Input/keyboard.js ***/
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.isFnKey = isFnKey;
exports.isSpaceKey = isSpaceKey;
exports.isCtrlKey = isCtrlKey;
exports.isAltKey = isAltKey;
exports.isShiftKey = isShiftKey;
exports.isMetaKey = isMetaKey;
exports.normalizeKeyBindingIdent = normalizeKeyBindingIdent;
exports.keyboardEventToKeyBindingIdent = keyboardEventToKeyBindingIdent;

function isFnKey(name) {
  return name.match(/^[fF]([2-9]|(1([0-2]?)))$/);
}

function isSpaceKey(name) {
  return name === ' ' || name.match(/^[sS]pace$/);
}

function isCtrlKey(name) {
  return name.match(/(^([cC]ontrol)|ctrl)$/);
}

function isAltKey(name) {
  return name.match(/^[aA]lt$/);
}

function isShiftKey(name) {
  return name.match(/^[sS]hift$/);
}

function isMetaKey(name) {
  return name.toLowerCase().match(/^(command|windows|meta)$/);
}
/***
 *
 * @param {string} text
 * @return {string}
 */


function normalizeKeyBindingIdent(text) {
  var keys = text.trim().toLowerCase().split(/[-+\s_.]+/).filter(function (w) {
    return w.length > 0;
  });
  var values = {
    meta: 1,
    ctrl: 2,
    alt: 3,
    shift: 4
  };
  keys.sort(function (a, b) {
    var va, vb;
    va = values[a] || 100;
    vb = values[b] || 100;
    return va - vb;
  });
  return keys.join('-');
}
/***
 *
 * @param {KeyboardEvent} event
 * @return {string}
 */


function keyboardEventToKeyBindingIdent(event) {
  var keys = [];
  var keyName = event.key || String.fromCharCode(event.which || event.keyCode);

  if (event.metaKey) {
    keys.push('meta');
  }

  if (event.ctrlKey) keys.push('ctrl');
  if (event.altKey) keys.push('alt');
  if (event.shiftKey) keys.push('shift');

  if (isSpaceKey(keyName)) {
    keys.push('space');
  } else if (isFnKey(keyName)) {
    keys.push(keyName.toLowerCase());
  } else if (!isMetaKey(keyName) && !isAltKey(keyName) && !isCtrlKey(keyName) && !isShiftKey(keyName)) keys.push(keyName.toLowerCase());

  return keys.join('-');
}

VaKeR 2022