PDA

View Full Version : Way to temp. disable keyboard?


Fooboy
2006-05-18, 12:27
Hey guys,

Is there a command / way to temporarily a keyboard on a mac laptop for a specific amount of time?

Thanks,

Foo

turtle
2006-05-18, 13:19
Sounds like a virus in the making. ;)

I have no idea.

Brad
2006-05-18, 13:22
Pull the plug! ;)

Luca
2006-05-18, 13:24
I'm not sure you could actually disable it entirely, but you could confuse the everliving SHIT out of someone by creating a new user account without a standard keyboard setup available. You could set it to Dvorak or something and disable the ability to switch to QWERTY. That would at least slow them down.

Fooboy
2006-05-18, 13:33
No ... I want to make a widget (I think I'll call it "Washboard") that you can click to disable keyboard inputs for 15-20 seconds so you can clean your keyboard.

Whenever I take a damp cloth or vacuum attachment to my keyboard, obviously the computer goes crazy. Talking on aim, you get a message like "asf8j392fjfea d ddddddddddddddddddddddddsorry I was cleaning my keyboard". Of course you can turn off your mac or sleep it, unplug your keyboard in some cases (not on a portable) ... but I think its a pretty useful idea.

turtle
2006-05-18, 13:36
Sounds like a good idea to me...run with it. Then if the "washboard" doesn't work out maybe it can be worked into a "hoax" code for some sucker in the computer lab. :D

Luca
2006-05-18, 13:37
Just switch to a different application.

ghoti
2006-05-18, 13:38
I think I now have to write a widget called "SmashBoard" that switches to a random application and then simulates random keystrokes (or pre-specified sequences like "asf8j392fjfea d dddddddddddddddddddddddd", depending on your preferences).

:p

Windowsrookie
2006-05-18, 14:50
You could always just shut it off when cleaning it. :)

ast3r3x
2006-05-18, 15:40
Turn it off

Delete the sequence

…your next widget will indicate what widgets are running? ;)

Bryson
2006-05-18, 15:56
This isn't really a problem on macs, as all the keyboards are USB. Just unplug it! On a PC with PS/2, on the other hand....

kieran
2006-05-18, 16:02
....... keyboard on a mac laptop ....

yea, dont think it's that easy to unplug a keyboard on a laptop.

chucker
2006-05-18, 16:15
Unload the kext.

(I strongly recommend you don't if you don't have some expertise on handling kexts, though.)

Fooboy
2006-05-18, 16:56
To Feild some comments - yes I know you can sleep your computer or turn it off, and in SOME cases (laptops are the exception) unplug your keyboard. I think a 15 second disable is the most convienent of any of the options, though not by much.

I think the idea is kinda novel - perfect for a widget.

Brad
2006-05-18, 17:06
Unload the kext.
:lol: Oh, man. I'm imagining someone typing a command at the command line to unload the relevant kext... and then...

Windowsrookie
2006-05-18, 17:21
Brad that was your 9,909 post! W00t!

Meltedbutter421
2006-05-18, 20:39
Fooboy I like your idea... but it is true, you could just shut it down or change windows... but it is a good idea :p
EDIT: oh, and i thought the title of the widget was pretty creative :D

Mr Beardsley
2006-05-19, 10:27
Chucker is correct that you could just unload the kext, and then reload it after a set period of time. However, doing this will require that you authenticate as an admin.

I'm not at my Mac to test, but here is my guess on the commands to get you started. Also realize that if you disable it, you won't be able to type in the command to re-enable it. You should probably try this in a script.

/* To Disable */
sudo kextunload /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBKeyboard.kext

/* To Re-enable */
sudo kextload /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBKeyboard.kext

DISCLAIMER:
I haven't tested this, so use at your own risk.