element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Dev Tools
  • Products
  • More
Dev Tools
Forum USB Mouse Project
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Dev Tools to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 5 replies
  • Subscribers 80 subscribers
  • Views 826 views
  • Users 0 members are here
  • usb
  • mouse
Related

USB Mouse Project

admsteck
admsteck over 11 years ago

Here is my project.  There is a website which helps you learn morse code (lcwo.net) and one of the features they have is a morse to text converter.  This allows you to tap out morse code using the mouse and it will convert to text.  For a more realistic experience, I would like to be able to use a real telegraph key.  My thought is to use a small microcontroller to provide the usb interface and I would only need one button and none of the x, y, or scroll.

 

I have no experience with microcontrollers and wanted to know which would be a good fit for this application.  I found a few PDFs that discuss using an atmel avr for a usb mouse application, but they focus primarily on the usb side of things and not the hardware.  I thought of buying a cheap usb mouse (all the extras I have are ps2), but I though this would be a good challenge and introduction to microcontrollers.  Thanks.

  • Sign in to reply
  • Cancel

Top Replies

  • dougw
    dougw over 11 years ago +1
    Hi Adam, One fairly easy way to do this is to take apart a mouse and hook your keyer in parallel with the mouse button. Another way is to get a HID controller and hook up your keyer to the mouse button…
  • johnbeetem
    0 johnbeetem over 11 years ago

    You might consider using two-mouse buttons to simulate an iambic paddle, where button 1 gives one or more dits, button 2 gives one or more dahs, and holding both buttons alternates dits and dahs.  This allows very fast entry and saves wear and tear on your finger and mouse buttons.  I don't know why "smart phones" have tiny QWERTY keyboards when a two-button Morse key would probably be faster, and you wouldn't have to look at it.

     

    Wikipedia: Telegraph key

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • admsteck
    0 admsteck over 11 years ago in reply to johnbeetem

    Unfortunately, the website I am currently using (lcwo.net) has a simple button on the page that acts like the key.  I just want to place the cursor over the button with my regular mouse, then use the usb enabled key I want to built to "click" the button.  I guess a microcontroller that would allow two buttons would allow for a future upgrade to an iambic paddle, but that would require me to purchase a more expensive paddle and also write my own morse to text software.  I already have an inexpensive telegraph key, and I am looking for recommendations on how to connect this to a pc to act as a mouse button.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dougw
    0 dougw over 11 years ago

    Hi Adam,

    One fairly easy way to do this is to take apart a mouse and hook your keyer in parallel with the mouse button.

    Another way is to get a HID controller and hook up your keyer to the mouse button connector.

    HID (Human Interface Device) is a standard USB interface class that is used by mice. Your computer will work with multiple HID mice at the same time, so your regular mouse will still work with your keyer connected as a mouse button.

    A third method is to go with a Bluetooth wireless version.

    Here are some links to check out:

     

    Joystick/Mouse Hybrid Controller (MW24J8-MOD) ($19.99) : Saelig Online Store

    Bluefruit EZ-Key - 12 Input Bluetooth HID Keyboard Controller [v1.2] ID: 1535 - $19.95 : Adafruit Industries, Unique & f…

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • hawkeyethehacker
    0 hawkeyethehacker over 11 years ago

    Have you tried taking a look at the Teensy? It should allow you to complete this project rather easily.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago

    That's a cool idea, and Joshua Bayfield's idea of using a Teensy also sounds like an interesting idea.  As far as what happens electronically (or more correctly electromechanically) when you press the mouse button it activates a tactile switch that sends a Voltage High signal across the USB connection to the controller (most are made by FTDI).  Hooking a 25-cent push-to-make tactile switch to a digital input on the uC is really all there is to that end of the hardware.  Your code would have to poll the input to detect when the button went high.  Just an example; in an Arduino this would be the DigitalHigh event.

    Having said that; if you want to use an Arduino, you might need to use a Due.  That board has an FTDI controller on the PCB to pass USB protocol signals.  Not having done this myself on a website I would encourage you to go to one of the forums for whatever uC you decide on.

    You will have to experiment with how the coding is implemented on the website.  Many computer languages have a variant on click-down (mouse button is pressed) and click-up (mouse button returns to open state) commands.  Most coders will use the click-up event.  That's why you can press the mouse button and it won't do anything until you release the button.  I'm guessing that's the case for this website; as it would need some way to distinguish timing between a dot and a dash.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube