Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

211
Views
Right Click => Print Event function in Angular or JS

I want to written function to all kind of screenshots and prints. Now I want to write function for right click and print in Angular. If anyone knows to crack that do let me know. Sample code is as below

  document.addEventListener('keydown', (e) => {
  if (e.ctrlKey && e.key == 'p') {
    // console.log("tried to print")
    // alert('This section is not allowed to print or export to PDF');
    this.prtScrEvent("Screenshot");
  }
});
//prtsc key press
window.addEventListener("keyup", (e) => {
  if (e.keyCode == 44) {
    // console.log("printing tried");
    // alert("The 'print screen' key is pressed");
    this.prtScrEvent("Screenshot");
  }
});

async prtScrEvent(status) {....}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

See if this helps for right-click.

document.addEventListener('contextmenu', (e) =>{
    // Your code
})
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!