This topic is locked

Keyboard Shortcuts?

3/22/2012 10:54:19 AM
PHPRunner General questions
D
DigitalDean8 author

I am looking at using PHPR as an inventory check-in/out system and would like to use a barcode reader to scan asset labels. Does anyone know if there are keyboard shortcuts available for the "Add New" button that I could trigger by embedding keyboard control codes in the barcode output? This would make it much easier to just scan and move forward.
Thanks

Dean

C
cgphp 3/22/2012

In the "Javascript onload" event of the List page, enter the following code:

//load the add page (or popup) if you press the n button

$(window).keydown(function(event) {

if(event.keyCode == 78) {

$("a[id^='addButton']").click();

event.preventDefault();

}

});