Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

Is it possible to make the enter key submit a tweet automatically on Twitter?

If so, how?

share|improve this question
    
It would be very simple to create a browser extension to do this. Tell me what browser you use and I'll start in a few hours –  JJ56 Apr 3 '12 at 5:30
    
@JJ56 - I primarily run Chrome and Firefox .. and an extension would be very cool :) –  warren Apr 3 '12 at 13:32
    
@JJ56 - were you able to get an extension made that would do this? I could see that being hyper-useful in the community :) –  warren Apr 16 '12 at 13:51
    
Sorry. I didn't get around to it, forgot about it, and have been on holiday for the last week. I will do it, I promise :) –  JJ56 Apr 17 '12 at 6:35
add comment

2 Answers 2

up vote 5 down vote accepted

It is not possible to use enter to submit the new tweet on Twitter.com. By default it creates a line break, even if line breaks are not displayed by Twitter.com and most apps.

The fastest way to post a tweet using your keyboard is the following:

  1. Press n for new tweet on your Twitter home page
  2. Write your tweet content
  3. Press tab and then enter to post it
share|improve this answer
    
<alt> then <enter> is not working in Chrome :\ –  warren Mar 28 '12 at 14:04
1  
Sorry @warren, my fault. I was thinking to tab and wrote alt, don't know why. Press TAB and then ENTER to post the tweet you are composing. –  Drake Mar 28 '12 at 14:09
1  
Would Control+Enter work? Enter and Control+Enter often interchangeably share the submit/new line functionality. I don't use Twitter so I can't check myself. –  Phong Mar 30 '12 at 17:48
3  
@Phong No that doesn't work. –  Fogest Mar 30 '12 at 18:20
add comment

Here's the solution I came up with (thanks to this post). You can download the full Greasemonkey script here.

setInterval (function() { checkForTweetbox (); }, 500);

function checkForTweetbox () {
    var tweetbox = document.querySelector ('div.tweet-box textarea');   //check for new tweet window
    if (tweetbox) {
        if (! tweetbox.weHaveProcessed) {
            tweetbox.weHaveProcessed    = true;
//          alert ('New tweet-box found!');
        }
    }   
    tweetbox.onkeydown = function(event){
        if(event.keyCode == 13){                                        //13 = Enter keycode
            document.querySelector ('a.primary-btn').click();           //there must be at least one character in the textarea  
        }
    }           
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.