How to disable imac keyboard and mouse while in sleep mode

Discussion in 'macOS' started by knemonic, Mar 2, 2009.

  1. knemonic macrumors 6502a

    Joined:
    Jan 14, 2009
    #1
    Hello,

    I like putting my iMac to sleep. Unfortunately I have a cat that moves the mouse and steps on the keyboard while I am work. Is there any way I can disable the keyboard and mouse and just use the power button to wake it up from sleeping?

    I basically want to keep it asleep as much as possible to save on electricity, since I am not home about 10 hours of the day and asleep for the other 7, makes no sense in draining all the electricity. I was hoping someone could lead me to a small piece of software that allow this to happen.

    Any help would be appreciated.
    Tim
     
  2. Eidorian macrumors Penryn

    Eidorian

    Joined:
    Mar 23, 2005
    Location:
    Indianapolis
    #2
    Unplug them and use the power button to sleep. :p
     
  3. knemonic thread starter macrumors 6502a

    Joined:
    Jan 14, 2009
    #3
    I kind of want to avoid that. I use my system before I leave for work every morning and dont want to have to worry about remembering to unplug it. Plus the plug is in a difficult spot, since I have a hub under my desk where all my usb cables consolidate into.
     
  4. Eidorian macrumors Penryn

    Eidorian

    Joined:
    Mar 23, 2005
    Location:
    Indianapolis
    #4
    Unplug the keyboard and mouse and use the power button on the back to sleep. ;)
     
  5. knemonic thread starter macrumors 6502a

    Joined:
    Jan 14, 2009
    #5
    Thats the only solution? There has to be an easier way, something more automatic? No other suggestions out there?
     
  6. Eidorian macrumors Penryn

    Eidorian

    Joined:
    Mar 23, 2005
    Location:
    Indianapolis
    #6
    You could set the timer to have your computer shutdown/power on in Energy Saver.
     
  7. knemonic thread starter macrumors 6502a

    Joined:
    Jan 14, 2009
    #7
    I actually have been doing that. Originally the issue was I was looking to see if I can setup up multiple times of the day where my computer is scheduled to shut down and start up. Someone at apple's discussion forum informed me that that was not possible, you can only do one time to start up and one time to shut down (I feel that I bet it is possible, its just no one has attempted it with the correct programming skills, which I do not have).

    Simply what I want to do is use my system twice in the day, once when I wake in the morning before I go to work and when I get home from work till I go to sleep. Between all that, I was hoping to keep it asleep the whole time. Since my cat likes to walk on the keyboard, sleep is not an easy thing to maintain, but then it also sounds like there is no way to setup multiple shut down and start up times.

    See my dilemma. I was hoping i would not have to worry about unplugging my system every time I leave and go to bed, especially in the morning, since I am usually worried about to many things before leaving.

    Thank you for the suggestion though!
     
  8. Eidorian macrumors Penryn

    Eidorian

    Joined:
    Mar 23, 2005
    Location:
    Indianapolis
    #8
    I'll check when I get home but if you shutdown your machine it'll still power it back up on the timer. I've never heard anything about multiple timers either but there's a slim chance you might be able to pull off something using launchd. That's a bit too much effort for something like this. :eek:
     
  9. AndrewLyle macrumors member

    Joined:
    Dec 6, 2008
    #9
    If you are somewhat crafty and technical, and If you don't mind using a hardware/analog approach... here is my quick suggestion..

    imac>switch>usb hub>mouse/key

    if you dont mind taking apart a $10 usb hub and soldering a rocker switch, then before you leave you can flip the switch, (which unplugs the usb hub) and let the computer fall asleep on its own...

    waking it back up would just mean flipping the switch, you computer would recognize that your usb hub and thus your mouse and keyboard were plugged in and wake up
     
  10. knemonic thread starter macrumors 6502a

    Joined:
    Jan 14, 2009
    #10
    Oh yaa, I use the schedule under the energy saver panel to its full extent, including having it startup at a certain time of the day. The problem is basically I want it to start up at 8:47am, turn off at 9:30am, startup at 7:00pm and then turn off at 1:00am. So far, I have not been able to find a software add on that allows this. Since I have not, I was hoping to find a way to disable the keyboard and mouse while in sleep and problem solved.

    I am definitely going to look into the launchd daemon. If I can find something there, I am golden.

    Thank you again for being so prompt with your replies!
    Tim
     
  11. knemonic thread starter macrumors 6502a

    Joined:
    Jan 14, 2009
    #11
    Honestly I like that idea a lot. I could even check out home depot and see if they sell a switch that connects between the ac outlet and the hub, they use these for turning off lights and such all the time.

    It seems though if the rocker switch is put at the power source, dont usb hubs go into a passive mode and draw power from the usb port on the back of my mac? In essence bypassing the need for ac power to the hub, potentially making it impossible to turn off the keyboard and mouse?

    I am going to Micro Center tonight and I will see if I can get some opinions along these lines. In essence, having a switch on the hub would be the same as using the power button on my imac, so i am not adding any steps but going the unplug route of the keyboard and mouse.

    Thanks!
     
  12. AndrewLyle macrumors member

    Joined:
    Dec 6, 2008
    #12
    my idea was a little more involved i was going to put the rocker switch inline of the usb cable , probably between the 5V line, so no information could be transmitted.. i would have to figure out the details but im not sure just cutting the power of the hub would work. I have a belkin hub that can be used with or without power... if you dont plug it in, you cant use "powered" devices, usb keyboards and mice rarely need to be plugged into a powered port
     
  13. MacBass macrumors 6502

    MacBass

    Joined:
    Aug 12, 2005
    Location:
    La Crosse, WI
    #13
    There are some A/B USB hubs (something like this: http://www.newegg.com/Product/Product.aspx?Item=N82E16817196066) out on the market, originally intended to be able to share a printer or other USB device between 2 machines, however, if you only plug one output into your Mac, switching to the other output would in effect be the toggle switch. Easy no mod solution.
     
  14. AndrewLyle macrumors member

    Joined:
    Dec 6, 2008
  15. tshort macrumors regular

    Joined:
    Jul 20, 2007
    #15
    1. Get rid of the cat...
    2. Close the door to the room with the computer so the cat is nowhere near it.
     
  16. knemonic thread starter macrumors 6502a

    Joined:
    Jan 14, 2009
    #16
    That will be my backup solution. Thank you for the suggestion. I am going with the analog method mainly cause it is cheap. I found a usb hub for $7 and the switch was $3. I am pretty confident it will work.

    AndrewLyle, when you mentioned putting the rocker on the usb cable, that is what I was thinking also. Question is, you mentioned putting the switch on the 5v pin out, but then went on to mention about that would cut out the data? Don't you mean that will kill all power going to the hub? The D+ and D- I thought is what the data is transmitted over and assumed if to stop transmission of date, the rocker would go there. I agree though the 5v pin out is the thing I should hit with the switch, since no power to the devices means no communication, dead dead desky.

    Any thoughts would be helpful.

    Thank you all for all the help. To end the post, listen to this post I got from a guy on Apple's Discussion forum.

    "I thought I was the only person to have this problem. I live with ten (yes you read that right), ten feline animal companions. And they never go outside.

    I use a Logitech Cordless Optical Trackman, and luckily the cats don't seem to fiddle with the trackball. But the wired keyboard is a problem. So my work-around is to unplug the keyboard from my 7-port Belken USB hub right before I put my computer to sleep using the power button. To awaken the computer I simply plug the keyboard back in, and 99 times out of 100 it starts right up. If that doesn't work, twirling the trackball does the job.

    The USB hub sits just behind the computer, and plugging and unplugging takes no real effort.

    As far as a software solution goes, I bet there is some program that requires a keystroke combination to cause the machine to wake from sleep, but I am happy with my method so I will leave that for others

    Archie the cat person"
     
  17. knemonic thread starter macrumors 6502a

    Joined:
    Jan 14, 2009
    #17
    I found a usb kvm switch at micro center for $20. Decided not even to play with switches and cutting cables, since obviously there is a chance it wont work. Kvm switch is guaranteed, or my money back.

    Thanks again!
     
  18. AndrewLyle macrumors member

    Joined:
    Dec 6, 2008
  19. Le Big Mac macrumors 68020

    Le Big Mac

    Joined:
    Jan 7, 2003
    Location:
    Washington, DC
    #19
    And let us know when you have to replace the kb because it is filled with hairballs.
     
  20. knemonic thread starter macrumors 6502a

    Joined:
    Jan 14, 2009
    #20
    Hey all, thought I would let you know this worked without a problem. Pretty much what I do now is since I cannot disable the keyboard and mouse once I am already in sleep mode, I simply click the kvm switch to the non existing computer (pc 2) and I have my imac setup to go to sleep after 10 minutes. When I need to wake it, I simply push the kvm to the mac (pc 1) and it turns on. Seems to work well.

    Another reason I wanted to have the ability to disable my keyboard and mouse was I once in awhile will notice something different to my system. Like a file is missing, or something was moved around. Once I lost an entire email account in Mail. Luckily I had it backed up, emails and all. I attribute this to my cat since there was no other way I can think it was caused. So this past solution was to turn the system off while I was not home. This is a much better solution.

    Thanks for everyone chiming in!
     
  21. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #21
    A much easier solution to this problem would have been to enable the option that requires you to type your password to wake from sleep. Chances are your cat doesn't know it :).

    Plus it keeps your computer locked. When the cat gets off the keyboard it will go back to sleep on its own using the standard sleep time set in the Energy Saver system preference pane.
     

Share This Page