One day I got really sick of clicking while using matrix.
So i began hacking up this (very messy) greasemonkey script (you need to install the greasemonkey plugin for firefox to use it)
I cant upload .js files so you will have to rename the attachment to matrix.user.js before you use it.
[attachment=345:matrix.user.js.txt] (download and rename to matrix.user.js) then just open it if firefox with greasemonkey installed and it will offer to install it.
it adds:
<ctrl><alt>` - help menu
<ctrl>s - save
<ctrl><alt>v - make live
<ctrl><alt>c - cascade changes
<ctrl><alt>l - get a lock
<ctrl><alt>h - set areas to html
<ctrl><alt>u - hide mysource areas in parse file
<ctrl><alt><s>u - show mysource areas in parse file
<ctrl><alt>1(one) - jump to edit contents screen of current asset (and get a lock)
<ctrl><alt>0(zero) - jump to screen select menu of asset
<ctrl><alt>m - insert %asset_metadata_DC.Description%
<ctrl><alt>n - insert %asset_name%
also a little menu at the top of the parse files textarea which inserts all the common MySource Areas you might use and causes the tab key to indent by 3 spaces and shift tab to outdent 3 spaces (works on blocks of code).
code may or may not work with your version of matrix tested (well more like used) with firerfox 2 and 3 on matrix 3.16.0
feel free to post suggestions or improvements
enjoy
Steven
matrix.user.js.txt (47.7 KB)
Greasemonkey Script to add keyboard shortcuts to MySource Matrix
Thanks so much, I installed it and it seems to work great. If I have any ideas I'll post them here!
Glad you like it, have updated the script to keep the cursor position in textareas when you click save so when you are 200 lines down a css file and testing changes you dont have to scroll back to find where you were up to.
Also removed so comments that caused the script to not install properly.
Yeah ... I so wish I had put that in first. :P I am thinking about changing to remember position based on asset id, cause at the moment it only rembers if you keep editing the same asset.
Steven,
I prefer <ctrl>a to lock/unlock an asset - uses less fingers
so you'll need to edit line 195 to;
if(event.ctrlKey && (event.charCode == 97)){ // 97 <- a key
Cheers Julian
P.S. there does seem to be a slight delay (2 seconds or so) between actioning the shortcuts & the actual execution, any clues ???
[quote]Steven,
I prefer <ctrl>a to lock/unlock an asset - uses less fingers
so you'll need to edit line 195 to;
if(event.ctrlKey && (event.charCode == 97)){ // 97 <- a key
Cheers Julian
P.S. there does seem to be a slight delay (2 seconds or so) between actioning the shortcuts & the actual execution, any clues ???[/quote]
Was thinking about creating configurable shortcuts (one day).
I did try to avoid common shortcuts like <ctrl>a but would be nice if ppl could pick their own.
Sorry no clues about the speed … maybe the lightning speed of matrix ? seem to submit the form instantly here.
Steven
I have uploaded a new version at http://steven.upritchard.com/code/mysource_matrix_greasemoneky
Trying it for the first time… are the shortcuts all the same as above?
There is some keyboard shortcuts in MySource Matrix:
Acquire Lock(s): Alt+A (Mac: Ctrl+A, Firefox: Alt+Shift+A)
Release Lock(s): Alt+R (Mac: Ctrl+R, Firefox: Alt+Shift+R)
Commit (Save): Alt+S (Mac: Ctrl+S, Firefox: Alt+Shirt+S)
Increase the size of the text in the Asset Map: Ctrl+Shift+Plus
Decrease the size of the text in the Asset Map: Ctrl+Shift+Minus
Jump to an asset in the Asset Map: First letter of the asset name
Move up the Asset Map:Up arrow
Move down the Asset Map: Down arrow
Expand the assets in the Asset Map: Right arrow
Collapse the assets in the Asset Map: Left arrow
Delete an Asset in the Asset Map: Delete key
You can find the full list of available keyboard shortcuts here on the manuals web site.