I'm using a Wiki application that has buttons to indent and outdent list items. I'd like to write a greasemonkey script to capture Ctrl+M and Ctrl+Shift+M for indent and outdent, respectively. Is this possible?
Yes it is possible, I've used scripts that rely on hotkeys before. I'm not familiar with writing greasemonkey scripts, but since it's just JavaScript, I believe you can use jQuery and a plugin like this one http://plugins.jquery.com/project/hotkeys. Using that plugin, doing what you want to do is as simple as
$(document).bind('keydown', 'Ctrl+M', fn);
You can probably do this pretty easily. You'd have to add event listeners to the input (textarea?). Here's an event tester so you can figure out what keyboard event properties and values you are hunting for: http://unixpapa.com/js/testkey.html
For example, control-shift-M gives you this keyup event in Firefox:
keyup keyCode=77 (M) which=77 (M) charCode=0
keyIdentifier=undefined keyLocation=undefined
shiftKey=true ctrlKey=true altKey=false metaKey=false
If you want some documentation on how to use key events, then read the MDC documentation here. Basically though you just want to add an event listener to either the document or some element within the document, then the event listener should determine if the desired keys have been pressed (and only those keys), if so then do the corresponding action.