hotkeys-js icon indicating copy to clipboard operation
hotkeys-js copied to clipboard

Add printscreen as a special key mapping for 44

Open ifdion opened this issue 5 years ago • 5 comments

Add printscreen as a special key mapping for 44

ifdion avatar Oct 16 '20 06:10 ifdion

Pull Request Test Coverage Report for Build 796

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 78.947%

Totals Coverage Status
Change from base Build 731: 0.0%
Covered Lines: 191
Relevant Lines: 211

💛 - Coveralls

coveralls avatar Oct 16 '20 06:10 coveralls

Codecov Report

Merging #229 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #229   +/-   ##
=======================================
  Coverage   90.52%   90.52%           
=======================================
  Files           1        1           
  Lines         211      211           
=======================================
  Hits          191      191           
  Misses         20       20           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e6ac5c9...e6781e5. Read the comment docs.

codecov-io avatar Oct 16 '20 06:10 codecov-io

@ifdion It is not a standard key code? macOS keyCode=124, windows keyCode=44, Linux keyCode=42 #217

KeyboardEvent.code Internet Explorer 11 Google Chrome 34 Chromium 34 Safari 7 Gecko 29
Windows Windows Mac (10.9) Linux (Ubuntu 14.04) Mac (10.9) Windows Mac (10.9) Linux (Ubuntu 14.04)
"PrintScreen" 0x2C (44) *4 0x2C (44) *4 0x7C (124)*5 0x2A (42) 0x7C (124)*5 0x2C (44) *4 0x2C (44) 0x2A (42)

https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode

jaywcjlove avatar Oct 16 '20 08:10 jaywcjlove

@jaywcjlove You're right. Should we check the the value on the user agent as you did on isff?

ifdion avatar Oct 19 '20 17:10 ifdion

@ifdion I wonder if there is a better way to achieve it?

jaywcjlove avatar Nov 06 '20 05:11 jaywcjlove