Jump to content


Photo

Admin Hot Keys

Module

  • Please log in to reply
35 replies to this topic

#21 ryan

ryan

    Hero Member

  • Administrators
  • 5,980 posts
  • 3380

  • LocationAtlanta, GA

Posted 20 July 2012 - 09:46 AM

Great update Soma! I'm really liking the new ajax page search. Only thing I wanted to mention though was the default key assigned to this ALT+Q can't be assigned in OS X because it's the application Quit command. I did it, and it immediately quit the browser, closed all windows, etc. I changed it to CTRL+Q, which seems to work well, but am thinking you chose alt+q because ctrl+q has the same problem on windows? Maybe there is some other default for this that would be safe across platforms? Maybe something like CTRL+. or CTRL+[ or CTRL+-

I love everything about this module, except that I'm confused by the templates/fields search. Probably because I'm just accustomed to clicking, rather than typing template/field names in the admin. In most sites, the quantities here are small enough to make the search seem overkill. So if there were a most wished for feature on my part, it would be that either: 1) it showed a list of templates/fields rather than a search box. Or; 2) that the field/template search boxes showed all of the fields/templates (that you could click to edit) and then filtered (rather than created) in the list as you type.

#22 Pete

Pete

    Administrator

  • Administrators
  • 1,802 posts
  • 727

  • LocationChester, England

Posted 20 July 2012 - 10:40 AM

Oddly in Windows it's Alt+F4 to quit an application, so Alt+Q probably starts your car by that logic ;)

Not saying Macs make any more sense mind, requiring a key with a fruit on when they ran out of letters and numbers that by all rights should produce an apple when pressed. :P

#23 Soma

Soma

    Hero Member

  • Moderators
  • 3,397 posts
  • 1928

  • LocationSH, Switzerland

Posted 20 July 2012 - 11:13 AM

Thanks Ryan for the suggestions. I'm not sure what u mean by this is quit application. On my mac command q is quit alt q is a special char. I sent you from my phone so keeping it short.

@somartist | modules created | support me, flattr my work flattr.com


#24 ryan

ryan

    Hero Member

  • Administrators
  • 5,980 posts
  • 3380

  • LocationAtlanta, GA

Posted 20 July 2012 - 12:55 PM

I'm actually using a 1987 IBM Model-M keyboard with my Mac, so I have an ALT key rather than an Command (Apple) key. But unless I'm mistaken, ALT and Command (Apple) are just platform specific names for the same thing. Macs also have something called the Option key, which I don't think has an equivalent on the PC. In my case, I just have Option mapped to my caps-lock key since I'm using an elderly PC keyboard. Regardless, I think that anyone on a Mac that uses this module would find the default search command (ALT-Q) causes their browser to quit. :) Though given that my setup isn't conventional Mac, it might be good for someone else on OS X to confirm.

#25 Michael Murphy

Michael Murphy

    Distinguished Member

  • Members
  • PipPipPip
  • 95 posts
  • 53

  • LocationBasel, Switzerland

Posted 20 July 2012 - 01:29 PM

The Alt key (also called the Option key) on Macs is normally used for special characters and adding umlauts and accents on letters. The default command for quit is CMD + Q. For me, the Alt + Q is not used for anything important (well it creates this nice character - œ )

Great module soma - very useful.

Did you think of a way around the issue with it not working when the field is in focus? I’d really like to be able to edit a field and then Ctrl + S to save - at present there is no way to quickly get out of the field so the shortcuts will work, without using the mouse. Maybe if you could press escape to exit the field and then use the shortcut? Or could you bind the plugin to all input fields? I am guessing you might also have some issues with Tinymce which has its own keyboard shortcuts. Probably not a simple solution to this one.

I like the search overlays, it’s like a quick launcher - pressing Escape to close the overlay dialog would be useful.

If you are looking for inspiration for more shortcuts I always thought the Gmail ones were very good

http://support.googl...=en&answer=6594

A way to navigate the tree would be great (although the “quick launcher” way is probably much better). Or a way to open next and previous items in the tree.

And a help overlay mapped to ? which shows current shortcuts would be useful during the Shortcut learning phase (and for clients)

#26 Soma

Soma

    Hero Member

  • Moderators
  • 3,397 posts
  • 1928

  • LocationSH, Switzerland

Posted 20 July 2012 - 04:32 PM

Ryan, first time I hear about this. Never had something else bound to Alt other than special chars. And if it's a issue it's there to change for the user. I could change it to ctrl+p which would be print. See where I'm going? :)

Thanks for the feedback Michael. I wasn't really thinking about getting it to work, because it's not broken, it's by intention and something to avoid problems. I think on save yes, as this would be the one making sense.

There's "esc" mapped to close dialogs, but it doesn't work on input focus to you have to shift+tab then hit "esc". Also clicking outside will close it.

You can navigation the tree with tabs and enter to open branches. I'm not sure I want to go this far anyway.

Something like a overlay for the shortcuts would be nice. Still this is basic module to originally give page save shortcuts but turned out much bigger. Also it's global and not on a user basis, and checks to hide templates and fields for editors are still on the plan.

@somartist | modules created | support me, flattr my work flattr.com


#27 WillyC

WillyC

    Sr. Member

  • Members
  • PipPipPipPip
  • 171 posts
  • 220

Posted 20 July 2012 - 09:24 PM

when.i do ALt.Q

NO CARRIER
&€$'""/-¥•



•^€~

#28 slkwrm

slkwrm

    Sr. Member

  • Members
  • PipPipPipPip
  • 279 posts
  • 101

Posted 21 July 2012 - 06:30 AM

Very nice module, Soma. What do you think about adding a shortcut to view an overlay with shortcuts cheat sheet? Or even a link to click on somewhere in admin interface, maybe next to profile/logout?
Also maybe some snippets from here to navigate between next/previous items will come in handy to enhance your great module.

#29 diogo

diogo

    Hero Member

  • Moderators
  • 2,068 posts
  • 1179

  • LocationPorto, Portugal

Posted 25 July 2012 - 09:57 AM

I came late to this, but it's a great idea! Thanks Soma, Will try it right away!

EDIT: on linux i will have to change all the combinations, Same problem as in windows of course...

#30 k07n

k07n

    Jr. Member

  • Members
  • PipPip
  • 28 posts
  • 17

  • LocationSamara, Russia

Posted 05 April 2013 - 01:22 AM

Hi!

 

Ctrl+S saves the page but also opens the browser's "save dialog".

Is it normal, just as ctrl+f4 and other standard shortcuts, or am I doing something wrong?

 

Actually Ctrl+S is one of several of the little MODX features that I'm miss so much.
 
upd: w7, chrome, FF. PW 2.3

Necessity is the mother of invention.

#31 Soma

Soma

    Hero Member

  • Moderators
  • 3,397 posts
  • 1928

  • LocationSH, Switzerland

Posted 05 April 2013 - 10:53 AM

You can set your own hotkey is the modules settings. I know windows uses ctrl+s is, so you have to use something else.

 

It's not easy to decide easy hotkeys that work on all platforms and browsers so it is configurable, backdraw is ideally it would also need to be configured per user and not as simple to do as it is now.

 

It's appreciated if someone likes to take the challenge, I'm happy to collaborate.


@somartist | modules created | support me, flattr my work flattr.com


#32 Roope

Roope

    Distinguished Member

  • Members
  • PipPipPip
  • 71 posts
  • 17

  • LocationTampere, Finland

Posted 08 May 2013 - 06:02 AM

For some reason module throws error:

Error: 	Call to a member function add() on a non-object (line 79 of /var/www/public_html/site/modules/AdminHotKeys/AdminHotKeys.module)

Any idea why this is happening?

 

I've unistalled module on public site and errors were gone, but when I downloaded files back to local, I got this same error - even when module was unistalled. I got site up and running by doing fresh install with mysql dump from ProcessExportProfile module.



#33 Soma

Soma

    Hero Member

  • Moderators
  • 3,397 posts
  • 1928

  • LocationSH, Switzerland

Posted 08 May 2013 - 06:37 AM

According to your error this code fails

 

$this->config->scripts->add($this->config->urls->AdminHotKeys . "jquery.hotkeys.js?v={$version}");

Strange ad it makes absolutely no sense. There's nothing wrong here and it's a common code used in many places in ProcessWire and I have no idea why it would fail there. I tested to make sure it works in all PW versions.

 

The error says that $this->config->scripts isn't an object, but then PW admin wouldn't work at all, and I see no indication AdminHotKeys screws that up. What PW version do you have installed and what PHP version, any other 3party modules?

 

Even if a module is uninstalled it will get parsed by php and any error will show. If you want to get rid of a module you ahve to remove it completely.


@somartist | modules created | support me, flattr my work flattr.com


#34 Roope

Roope

    Distinguished Member

  • Members
  • PipPipPip
  • 71 posts
  • 17

  • LocationTampere, Finland

Posted 08 May 2013 - 07:14 AM

Actually we do have a compiler molude which uses $config->scripts and $config->styles for fileset arrays. Basicly we override both arrays on frontend (would explain why $this->config->scripts isn't object anymore), but AdminHotKeys shouldn't do anythig there, am I right?

 

PW version is latest public 2.3.0 and other installed third party plugins are:

https://github.com/BlowbackDesign/emo

https://github.com/n...essSelectorTest

Plus Ryans:

https://github.com/r.../ImportPagesCSV

https://github.com/r...ssExportProfile



#35 Soma

Soma

    Hero Member

  • Moderators
  • 3,397 posts
  • 1928

  • LocationSH, Switzerland

Posted 08 May 2013 - 07:38 AM

Ah you get that error on front-end! Yeah then it's because you overwrite $config->scripts. Yeah the module does also get init'd on front-end as all autoload module does, but the hooks also get executed.

 

I just updated the module now to not add the hooks when on front-end. 


@somartist | modules created | support me, flattr my work flattr.com


#36 Roope

Roope

    Distinguished Member

  • Members
  • PipPipPip
  • 71 posts
  • 17

  • LocationTampere, Finland

Posted 08 May 2013 - 08:12 AM

Yep, this got rid of errors - thanks Soma!







Also tagged with one or more of these keywords: Module

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users