Implement respond-to-author bound to the 'R' keypress.

(imported from commit d38b57d175a10423c566549371ae70032b02c29d)
This commit is contained in:
Luke Faraone 2012-10-03 11:30:48 -04:00
parent b16c3f1982
commit 6e4daba2aa
1 changed files with 8 additions and 2 deletions

View File

@ -41,7 +41,10 @@ function process_hotkey(code) {
return process_hotkey; return process_hotkey;
} }
if (num_pressed_keys() > 1) { if (num_pressed_keys() > 1 &&
// "shift" "caps lock"
!((pressed_keys[16] === true || pressed_keys[20]) &&
num_pressed_keys() === 2)) {
// If you are already holding down another key, none of these // If you are already holding down another key, none of these
// actions apply. // actions apply.
return false; return false;
@ -63,7 +66,10 @@ function process_hotkey(code) {
case 114: // 'r': respond to zephyr case 114: // 'r': respond to zephyr
respond_to_zephyr(); respond_to_zephyr();
return process_key_in_input; return process_key_in_input;
case 82: // 'R': respond to author
$('#zephyr-type-tabs a[href="#personal-message"]').tab('show');
prepare_huddle(zephyr_dict[selected_zephyr_id].sender_email);
return process_key_in_input;
case 103: // 'g': start of "go to" command case 103: // 'g': start of "go to" command
return process_goto_hotkey; return process_goto_hotkey;
} }