Catch Command R in Safari with JQuery

0 votes

I need to intercept the browser-reload-functionality in Safari (I know this is usually not something one should do, but in my case this makes sense).

For Windows I just do this:

$(document).keydown(function(event) {
    if ( event.which == 116 ) {
        restart();
        return false;
    }
});

Do I need to use a JQuery Plugin to capture two Keys at the same time or is this already implemented in JQuery in some form?

Also, are the keycodes under Mac the same as they are under windows? ("Command" being the keycode "17" and "r" being "19"?) or is it "55" for the command key and "15" for "r"?

Aug 19, 2022 in Web Development by gaurav
• 23,260 points
387 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Web Development

0 votes
0 answers

jQuery exclude elements with certain class in selector

I want to setup a click event ...READ MORE

Jul 20, 2022 in Web Development by gaurav
• 23,260 points
1,313 views
0 votes
0 answers

How can I specify Google map with driving direction in jQuery mobile

I have done a Google Maps based ...READ MORE

Jul 20, 2022 in Web Development by gaurav
• 23,260 points
580 views
0 votes
0 answers

showing result of calculating in textbox with jquery

I want to calculate division of 2 ...READ MORE

Jul 25, 2022 in Web Development by gaurav
• 23,260 points
518 views
0 votes
0 answers

Draw divs in elliptical shape with jQuery

It seems that my math is not ...READ MORE

Jul 27, 2022 in Web Development by gaurav
• 23,260 points
528 views
0 votes
0 answers

UL subdrop not working with jquery in Asp.Net C#

Keep searching why sub drop not working ...READ MORE

Jul 29, 2022 in Web Development by gaurav
• 23,260 points
386 views
0 votes
1 answer

get Date between 2 dates in jquery with format (dddd MMMM Do, YYYY)?

This is fairly easy to achieve with ...READ MORE

answered Aug 5, 2022 in Web Development by rajatha
• 7,680 points
866 views
0 votes
1 answer

How to use jquery with asp.net ajax?

If you weren't aware, Microsoft is planning ...READ MORE

answered Oct 15, 2018 in IoT (Internet of Things) by Annie97
• 2,160 points
747 views
0 votes
1 answer

Is 'sparkline' a method?

I suggest you to check 2 things That jquery.sparkline.js is actually ...READ MORE

answered Nov 9, 2018 in Apache Spark by Frankie
• 9,830 points
1,271 views
0 votes
1 answer

What is jQuery?

Hey, jQuery is a fast and concise JavaScript ...READ MORE

answered Feb 14, 2020 in JQuery by kartik
• 37,520 points
1,318 views
0 votes
1 answer

Error: Global Variable is not accessable to local function

Hey kartik, A variable declared outside a function has a ...READ MORE

answered Feb 19, 2020 in PHP by Niroj
• 82,840 points
1,088 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP