A shortcut to show an object

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
iezhawe
 
 
Posts: 18
Joined: Mon Oct 25, 2021 7:56 am

A shortcut to show an object

Post by iezhawe »

Is it possible, if I want to display the login form in a dialog using a shortcut / hotkey (example : Ctrl+F12) besides using a button / link?
User avatar
Pablo
 
Posts: 22476
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: A shortcut to show an object

Post by Pablo »

There is no standard solution for this. This requires a custom script.
But I think it would be confusing for the user if each webpage had its own keyboard shortcuts.

Also, most shortcuts are already implemented in the browser
https://www.w3schools.com/tags/ref_keyb ... rtcuts.asp
User avatar
BaconFries
 
 
Posts: 5642
Joined: Thu Aug 16, 2007 7:32 pm

Re: A shortcut to show an object

Post by BaconFries »

See the following url. But as Pablo mentions using this method could confuse the user. Also note that in general mobile devices don't have a alt /crtl key so implementing this could simply be pointless unless a button is also added.

https://www.theamplituhedron.com/articl ... avaScript/
iezhawe
 
 
Posts: 18
Joined: Mon Oct 25, 2021 7:56 am

Re: A shortcut to show an object

Post by iezhawe »

Thank you for your answer
Yes I understand this method will be confusing if each page uses this.

I just want to have a secret key intended for the admin on one page (and only operated on the PC) that was only to display the login dialog box or to be applied to the various other needs.

Thank you Pablo and Baconfries who always give guidance and direction. :D
Joe_120
 
 
Posts: 30
Joined: Fri May 21, 2021 3:10 pm
Location: Cornwall

Re: A shortcut to show an object

Post by Joe_120 »

iezhawe wrote: Fri Jan 07, 2022 4:23 am

I just want to have a secret key intended for the admin on one page (and only operated on the PC) that was only to display the login dialog box or to be applied to the various other needs.
Paste the following jquery into an html object and set "Before </body>" in the object dropdown.

Code: Select all

<script>
$(document).keydown(function(event) {
    if (event.altKey && event.which === 65)
    {
        $('#indexDialog1').dialog('open');
        e.preventDefault();
    }
});
</script>
The keys are Alt + a and will bring up a dialog form.

You can see a demo here https://form.discoverproductivity.co.uk/

Joe
If it wasn't for bad luck, I'd have no luck at all.
Post Reply