Apple Magic Trackpad with Keyboard Functionality

Discussion in 'Mac Accessories' started by MikeNemat, Aug 16, 2010.

  1. MikeNemat macrumors regular

    Aug 6, 2006
    Hey everyone,

    I'm working on a software project to turn the bottom 1/3 of the magic trackpad into a keyboard. The idea is that you print the layout of the iPhone keyboard onto an overhead transparency sheet or an invisibleshield sticker and stick it to the trackpad, and then a software app renders the keyboard on screen and generates keystrokes for the correct buttons. I should add that you don't have to stick anything to the trackpad if you don't want to, but it makes it a lot easier to use.

    I have this semi-working right now. Is this something that anyone here would be interested in trying in a few days or a week when it's working better?
  2. -SD- macrumors 6502

    Mar 23, 2009
    Peterborough, UK
    Sounds very interesting. Personally, I'd be more interested in using it as a number pad, with a menulet I can click to switch between that and trackpad functionality.

  3. rmunroe macrumors newbie

    Aug 24, 2010
    I'm quite interested in this. I'm currently working with a friend who has trouble using keyboards due to repetitive strain/nerve injury, and we're trying to set him up with a touch-only keyboard so he doesn't have to use any pressure on the board. I haven't been able to find any capacitive keyboards (we've decided against playing with the projected ones for now).

    We were going to use an iPad turned on its side, but a magic touchpad would certainly be cheaper.

    The ideal version of this would be a pair of magic touchpads set side-by-side, with the keyboard split between them, taking up most of the space on it. Is this something that your software could be easily modified to do? If so, you'd have at least one grateful user out there.

    Edit: Of course, getting two magic touchpads to connect and communicate at the same time may be the hardest part of this, for all I know ...
  4. MikeNemat thread starter macrumors regular

    Aug 6, 2006
    I will be posting a beta version in the first week of September. Stay tuned :)
  5. Icaras macrumors 603


    Mar 18, 2008
    California, United States
    I've always thought Apple had the potential to turn the trackpad into a wireless touchscreen numberpad to complement the wireless keyboard.

    All they would need to do is add a preference in system preference to enable the trackpad as a number pad and provide a simple plastic overlay with printed numbers on it to see what you're tapping. Maybe you can do something like this too?

    Anyway, I think your idea is awesome. Can't wait to see it :)
  6. MikeNemat thread starter macrumors regular

    Aug 6, 2006
    Hi everyone:

    Here is an early alpha version of this application. I've named it 'MagicKeyboard'. It is primarly intended for use on an HTPC / Home Theatre Mac Mini so that you can use a Magic Trackpad as your only input device. It is relatively easy to generate new layouts so please let me know if you have any requests. I'll probably create one layout for the next revision of this app which is clone of the Apple Remote. I will also make the primary layout selectable from the Menu Icon menu, currently the QWERTY/ABC layout is the primary one. Can't wait to hear some feedback!

    Important info:

    0) Most important: you might have to turn off the One Finger "Tap to click" gesture in the Trackpad settings in System Preferences for this app to work properly.
    1) This turns the BOTTOM HALF of your magic trackpad (or any multitouch device on your Mac) into a touch keyboard (the keyboard is visualized on screen via an always-on-top GUI).
    2) To exit MagicKeyboard, use the upper half of your trackpad to go to the Menu Bar Icon, click it, and click Quit. You can also try focusing the App and doing Command+Q, though this might have mixed success.
    3) The checkboxes in the app merely indicate whether various modifier keys are enabled, you can't use them to enable the modifier keys. Modifier keys (command, control, etc) can be accessed through the Globe/International button on the first page of the keyboard.
    4) I will eventually sort out selecting the tracking device to turn into a magic keyboard, this will make it so that my application doesn't run on ALL multitouch devices on your machine, in case you're running it on a laptop or along with a Magic Mouse.
    5) This app might not work if your keyboard layout is not set to US or Canadian English/QWERTY.
    6) If you really like it, you might want to consider using 'BetterTouchTool' to create a gesture to launch the application!
    7) I'm aware of the slightly annoying issue where your palm can trigger a keystroke at the edge of the trackpad. I'm not entirely sure what the best solution on this issue is very welcome!
    8) Red dots / tap noises representing a tap will only be displayed if you tap within range of a virtual keyboard button. If you tap in between the buttons, no visualizations or sounds will be generated.

    I'm also including a file called keyboard.png which you can print onto an overhead transparency sheet or sticker paper to stick to your magic trackpad to make typing easier. Make sure to scale it to the width of a magic trackpad when printing (measure with a ruler or something...). The bottom of the spacebar should touch the bottom of the trackpad to help with alignment.

    Attached Files:

  7. MikeNemat thread starter macrumors regular

    Aug 6, 2006
    Most of the code in this project is through private undocumented APIs in OS X which Apple frowns upon people using. Thus, there is literally NO official documentation and it's a lot of guesswork between dicking around with it myself and searching for code examples from people who've done similar things. From what I can tell, there isn't any way to scale this Application across two touchpads (I can make it run on them both individually, but not using one touchpad as the left half, the other as the right). There might be some way to run two instances of the app with a custom layout, one for each trackpad, but selecting the touch device to listen for taps on is something I have yet to get working.
  8. 2contagious macrumors 6502a


    Apr 29, 2008
    This is an awesome idea for use as a remote (for people who use their Mac Mini as a media center for example). I'll try the software once I've got a MagicTrackpad (still waiting for it). I'll probably end up trying to come up with a nice design for a keyboard print out. :D You could even start selling perfectly aligned, pre-printed and self-adhesive transparent sheets for the MagicTrackpad :)

    A crazy idea would be to get the glass surface of the trackpad engraved with a laser. I don't know if that would work on this type of glass though.. or if it would damage the functionality (although it should work, since the multi-touch technology is under the glass, no?)
  9. (hwhvelo)bullet macrumors newbie

    Sep 8, 2010
    hey mike, thanks a lot for that tool, it´s awesome....
    i´m looking for a tool using the trackpad for a numpad, you think that would be possible?
  10. AnonMac50 macrumors 65816

    Mar 24, 2010
    Would this work on an internal multitouch trackpad?
  11. Ka Ora! macrumors regular

    Jan 23, 2009
    I dont know if you have looked at Controllermate, It recognises different inputs from usb controllers. You can use 2 keyboards and have them output different symbols with virtually mapped set ups.
  12. AnonMac50 macrumors 65816

    Mar 24, 2010
    I tried this out on the internal trackpads of a MacBook6,1 and a MacBookPro4,1.

    Works awesome.

  13. andersduus macrumors newbie

    Sep 30, 2010
    I love the magic keyboard

    Hello. Thank you very much for the magic keyboard application. I already use it a lot.

    I have a few UX improvements that I hope you can use:

    1. If you show the red dot (on the on-screenkeyboard) when the user clicks (and keep it visible ON WHILEDOWN) but only activate the keystroke when the user releases/lifts his finger. This way you don't need to print out anything for the magic trackpad as you can see onscreen where you are clicking.

    2. I think you should remove the indicator bar on top of the on-screen keyboard and implement the keys with down-states as well. This way you are keeping the normal function of a keyboard and clearly shows what is going on.

    3. you are aware of this but the design of the 123 page is not done. Let me know if you need help preparing graphics for the app (and perhaps a nice icon as well)

    4. last thing - I could really use a danish keyboard, but I guess i'm a minority :)

    Very good work - keep it up.

    Best Regards
  14. Mr Kram macrumors 68020

    Mr Kram

    Oct 1, 2008
    very cool idea.

    could there be an app made to support the ipad?
  15. gdeusthewhizkid macrumors 6502a


    Nov 14, 2008
    hmmm i was torn between this or the magic mouse i ended up going with the trackpad. I was sure i didnt like the fact that the magic mouse drinks batteries like water. not sure if im gonna use it with my htpc or my macbook pro.... :cool:
  16. Seanocaster macrumors newbie

    Oct 15, 2010
    This concept is ingenious :) I must commend you.

    If this could be perfected, i'd happily pay for the app.

    At the moment, the restriction for me is that the trackpad needs to be used from my bed to browse the computer screen on a projector. This means the trackpad would need to be in "tap to click" mode.

    If this mode is disabled, the application works excellently. Any chance of getting this same functionality with "tap to click" enabled ?


  17. ringsofdeath macrumors newbie

    Jan 2, 2008

    Very nice. I thought about using the trackpad as a keyboard, Googled, and found this thread.

    It would be very nice to provide the geekier users with a way to make their own layouts.

  18. boecherer macrumors newbie

    Dec 7, 2009

    This is a great concept. As someone mentioned above, it would be cool to use the MT as a keypad. I currently have an SMK-Link keypad which works pretty well and is USB, but it's not as nice as the MT and it's plastic, not aluminum. I also have a MT that doesn't get much use since I still like the Magic Mouse but it would be cool to use it as a keypad and do away with the SMK-Link keypad. The advantage of the SMK-Link is that it can operate as a standalone calculator too.

    I found this thread looking for something that would turn the MT into a keypad. I was thinking of a printed overlay like a ZAGG InvisiSHIELD with a keypad preprinted on it. For starters, just some clear plastic like the InvisiSHIELD could be used and the keys written on with a whiteboard marker or a Sharpie.

    The Calculator app could be run and the same layout could be used on the MT.

    MC M+ M- MR

    C +/- / X

    7 8 9 -

    4 5 6 +

    1 2 3 =

    0 .

    Just a thought. If you have any response and/or would like to pursue getting plastic sheets printed up that could be overlaid, I can help with that.

  19. tony421 macrumors newbie

    Feb 4, 2011
    MikeNemat. PLEASE contact me. I can't figure out how to send a PM here but please contact me. I have already developed the plastic overlay for a similar magic trackpad project and i need to code the software part of it. I have a printer on standby and if i can get this coded, i'd be selling a set of 3 films+the software for $20-25. please contact me.
  20. pgeiger macrumors newbie

    Feb 10, 2011
    I would love to see your source-code

    Hi Mike,

    I'm trying to build a keyboard for the android-os out of two mac touchpads. There's a guy out there who's built one for linux, but his code causes kernal-panics, so I'm trying to get his code, but obviously your code is pretty stable.

    If you'd share, that'd be awesome. If I can get anything done with my project, I'll share it back to you.

    Peter - PS - I befriended you on Facebook trying to get a message through to you.
  21. MikeNemat thread starter macrumors regular

    Aug 6, 2006
    Hey everyone sorry for the lack of updates. I've been super busy with tons of other stuff and this is no longer a priority for me. Also I've been bombarded with emails, facebook messages, etc, so it would be nice if that could stop :)

    Here's a link to the source with it whatever you'd like, just give me a shoutout or something in your release notes if you release it (and credit the respective owners of some libraries I've used). Unfortunately I won't be able to help you if there are any issues...but the basic keyboard functionality works great and can be launched/compiled with XCode (numpad layout still needs work). If I revisit it sometime in the future, I will post updated source code and binaries in this thread.
  22. lele macrumors newbie

    Feb 27, 2011
    Hi MikeNemat. Thanks for sharing the source code for this project.
    I would like to continue developing it (I already have a version with the full numpad fixed and some other improvements/fixes).
    Unless you have something against it, I'm going to put publish it as an open source project i.e. on googlecode, and continue its development there, so that the changes I make (or anyone else if they want to) can be available for everyone in future.
    Once I get a couple more issues fixed, I'll publish it and post the project links here, if it's okay with you.
  23. lele macrumors newbie

    Feb 27, 2011
  24. MikeNemat, Mar 15, 2011
    Last edited: Mar 15, 2011

    MikeNemat thread starter macrumors regular

    Aug 6, 2006
    Cool! Hope you guys have fun with it (and that my hacked together code wasn't too brutal to figure out!), maybe I'll hop back on as a contributor some day when I have more time but by all means I'm thrilled that you turned it into a google code project as something like this is really best suited to an open-source community effort given the pain-in-the-ass nature of the undocumented APIs.

Share This Page