code: function compareHotkey(object, event) {
    for (const key in object) {
      const expected = object[key]
      let actual
  
      if (expected == null) {
        continue
      }
  
      if (key === 'key') {
        actual = event.key.toLowerCase()
      } else if (key === 'which') {
        actual = expected === 91 && event.which === 93 ? 91 : event.which
      } else {
        actual = event[key]
      }
  
      if (actual == null && expected === false) {
        continue
      }
  
      if (actual !== expected) {
        return false
      }
    }
  
    return true
  }
docs: Compare.