Soma Posted July 20, 2012 Author Share Posted July 20, 2012 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. Link to comment Share on other sites More sharing options...
WillyC Posted July 21, 2012 Share Posted July 21, 2012 when.i do ALt.Q NO CARRIER &€$'""/-¥• •^€~ Link to comment Share on other sites More sharing options...
slkwrm Posted July 21, 2012 Share Posted July 21, 2012 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. Link to comment Share on other sites More sharing options...
diogo Posted July 25, 2012 Share Posted July 25, 2012 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... Link to comment Share on other sites More sharing options...
k07n Posted April 5, 2013 Share Posted April 5, 2013 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 Link to comment Share on other sites More sharing options...
Soma Posted April 5, 2013 Author Share Posted April 5, 2013 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. 1 Link to comment Share on other sites More sharing options...
Roope Posted May 8, 2013 Share Posted May 8, 2013 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. Link to comment Share on other sites More sharing options...
Soma Posted May 8, 2013 Author Share Posted May 8, 2013 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. Link to comment Share on other sites More sharing options...
Roope Posted May 8, 2013 Share Posted May 8, 2013 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/niklaka/ProcessSelectorTest Plus Ryans: https://github.com/ryancramerdesign/ImportPagesCSV https://github.com/ryancramerdesign/ProcessExportProfile Link to comment Share on other sites More sharing options...
Soma Posted May 8, 2013 Author Share Posted May 8, 2013 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. 1 Link to comment Share on other sites More sharing options...
Roope Posted May 8, 2013 Share Posted May 8, 2013 Yep, this got rid of errors - thanks Soma! Link to comment Share on other sites More sharing options...
k07n Posted June 28, 2013 Share Posted June 28, 2013 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? There are long pages in my project, and I'm tired to scroll up/down to save the page. So I've installed this module again and added this little fellow - "return false" "e.preventDefault()" to the function savePage in AdminHotKeys.js and browser doesn't fire "save dialog box" any more on Ctrl+S. if($('button[id*="submit"]').length > 0){ function savePage(e){ $('button[id*="submit"]').trigger('click'); e.preventDefault();}; $(document).bind('keydown', hkconf.hk_save, savePage); } Soma, thx again 4 the module. upd: fellow changed %) 2 Link to comment Share on other sites More sharing options...
maba Posted July 24, 2013 Share Posted July 24, 2013 Soma, can you fix version value in the code? 008 result 0. Thanks! Link to comment Share on other sites More sharing options...
Soma Posted July 24, 2013 Author Share Posted July 24, 2013 Soma, can you fix version value in the code? 008 result 0. Thanks! Ah thanks for mention. It this strange thing with versions when being 008 it threats it as octal number, although when on version 0.0.7, it shows that an update 0.0.8 is available (shows it correct) but after updating it displays 0.0.0. :/ Ryan? Edit: I corrected this with 008 changed to 8. 1 Link to comment Share on other sites More sharing options...
OrganizedFellow Posted July 26, 2013 Share Posted July 26, 2013 For fun, you should put in some Easter Egg after someone enters the Konami Code Link to comment Share on other sites More sharing options...
Soma Posted July 27, 2013 Author Share Posted July 27, 2013 For fun, you should put in some Easter Egg after someone enters the Konami Code and that would be, I mean the eastern egg? 1 Link to comment Share on other sites More sharing options...
totoff Posted November 22, 2014 Share Posted November 22, 2014 Unfortunately the module doesn't seem to work with 2.5. ctrl+shift+m for example leads to /page/undefined/ Link to comment Share on other sites More sharing options...
Michael Atul Kumar Posted January 24, 2015 Share Posted January 24, 2015 Hey.. any news on this one? Still no support for 2.5? Link to comment Share on other sites More sharing options...
Soma Posted January 24, 2015 Author Share Posted January 24, 2015 It should work fine in 2.5. Just haven't come to test So haven't marked as 2.5 in directory. If you try and it works let me know. I think some update for various admin pages shortcuts needs to get revised but other than that it should be fine. 1 Link to comment Share on other sites More sharing options...
ICF Church Posted October 11, 2017 Share Posted October 11, 2017 Does not properly work with 3.0 - shortcuts for module etc. add "undefined" to the end of the url, page search does not work as well. Page save works… edit: Dug into js and found hardcoced selectors… With the new Admin Theme it did not work anymore, had to replace #topnav with #pw-masthead – then it works. I'll attached a file that should work for both versions. edit 2: Attached file with fix and some more improvements (like variables moved out of global scope, etc.) AdminHotKeys.js edit 3: The the last file did not yet work with edit-page. This one works with edit page (more like a goto any file…) I have changed the ajax Request to resamble the search field in the upper right of WP3 — not sure if that's the way to go, but it works. Don't know if it also works with PW < 3 AdminHotKeys-3.js Link to comment Share on other sites More sharing options...
Soma Posted October 12, 2017 Author Share Posted October 12, 2017 Thanks. I guess that's why the modules states it's compatible until PW 2.4. I have no plans to update the module for 3.+. Link to comment Share on other sites More sharing options...
gmclelland Posted October 12, 2017 Share Posted October 12, 2017 Note: https://github.com/rolandtoth/AdminOnSteroids/wiki#hotkeys AdminOnSteroids has some of this module's functionality if you need something that works with 3.+ 1 Link to comment Share on other sites More sharing options...
tpr Posted October 12, 2017 Share Posted October 12, 2017 I can add other hotkeys too if there's a need (but may take some time) 1 Link to comment Share on other sites More sharing options...
szabesz Posted October 13, 2017 Share Posted October 13, 2017 18 hours ago, tpr said: I can add other hotkeys too if there's a need I guess it would be popular, even though no one else replied to your post so far... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now