Author Topic: Disabling physical keyboard of Laptop  (Read 5160 times)

0 Members and 1 Guest are viewing this topic.

Offline azhdar

  • Praise the AZERTY god
  • Thread Starter
  • Posts: 2444
  • Location: France
  • 65% Enlightened
Disabling physical keyboard of Laptop
« on: Fri, 06 November 2015, 14:40:18 »
Beside opening the laptop and unplugging the keyboard. What are easy way to do it?

Autohotkey script? Software ?
Azerty Propagandiste

Offline inanis

  • Truly Literally The Cloud
  • * Destiny Supporter
  • Posts: 790
  • Location: Dark Places
    • SEALWoodworking
Re: Disabling physical keyboard of Laptop
« Reply #1 on: Fri, 06 November 2015, 14:41:01 »
The BIOS perhaps?
Some hearts are gallows, I'm not here for hangin' around

Offline weehooherod

  • Posts: 13
Re: Disabling physical keyboard of Laptop
« Reply #2 on: Fri, 06 November 2015, 14:55:41 »
What OS are you using? I use this on my mac to disable the built in keyboard.

Code: [Select]
sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext

Offline azhdar

  • Praise the AZERTY god
  • Thread Starter
  • Posts: 2444
  • Location: France
  • 65% Enlightened
Re: Disabling physical keyboard of Laptop
« Reply #3 on: Fri, 06 November 2015, 14:57:07 »
The BIOS perhaps?

iirc I couldn't on this laptop.

What OS are you using? I use this on my mac to disable the built in keyboard.

Code: [Select]
sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext

I'll re install this laptop with either W7 or some linux, not sure yet.
Azerty Propagandiste

Offline weehooherod

  • Posts: 13
Re: Disabling physical keyboard of Laptop
« Reply #4 on: Fri, 06 November 2015, 15:00:25 »
The BIOS perhaps?

iirc I couldn't on this laptop.

What OS are you using? I use this on my mac to disable the built in keyboard.

Code: [Select]
sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext

I'll re install this laptop with either W7 or some linux, not sure yet.

I'm not sure about Windows but with Linux there are a myriad of ways to do this. Find some solution on a forum somewhere and throw it in whatever startup script your Linux distribution uses if you'd like it to be disabled when you turn it on.

Offline rm-rf

  • Posts: 357
  • Location: Bellingham, WA
Re: Disabling physical keyboard of Laptop
« Reply #5 on: Fri, 06 November 2015, 15:01:34 »

Offline Flossed

  • Posts: 36
  • Location: New Jersey
  • Hai
Re: Disabling physical keyboard of Laptop
« Reply #6 on: Fri, 06 November 2015, 16:32:46 »
Show Image


Proceed with caution using this method, you might damage some other components.  :thumb:

Offline rm-rf

  • Posts: 357
  • Location: Bellingham, WA
Re: Disabling physical keyboard of Laptop
« Reply #7 on: Fri, 06 November 2015, 16:41:04 »
depending on what kind of laptop you've got, some are fairly easy to just unplug the keyboard on.
but it also may be possible via bios.
shame it isn't as easy to disable like the track-pad is.

Offline Touch_It

  • Posts: 715
Re: Disabling physical keyboard of Laptop
« Reply #8 on: Fri, 06 November 2015, 16:47:10 »
maybe you can disable the keyboard driver?


Visit the Typing Test and try!

Offline n

  • Posts: 1
  • Location: AU
Re: Disabling physical keyboard of Laptop
« Reply #9 on: Fri, 06 November 2015, 20:38:33 »
Google will find many examples for whatever Linux distro you pick. For Windows I use DevCon, but you could get by with a ghetto AutoHotKey script along these lines:

Disable Device (WinKey + X example)

#x::
    Run, devmgmt.msc                                     ; Open Device Manager
    Sleep 1000                                           ; Wait for Device Manager to load, adjust as preferred
    WinActivate, Device Manager                          ; Set focus to Device Manager
    Sleep 100
    ControlClick, SysTreeView321, Device Manager,,,, NA  ; Simulate click on Device Manager (without this, no keyboard input is accepted)
    Sleep 100
    Send {Tab}                                           ; Move focus to the device ListView control
    Sleep 100
    Send {Down}{Down}{Down}{Right}{Down}{AppsKey}d       ; Random example; adjust the number of {Down} commands to get to the dev family
                                                         ; you want, the right arrow to expand devices, and down again to set focus on a
                                                         ; particular device. Then hit the menu key to open the context menu and the D
                                                         ; key to disable the selected device.
    Sleep 100
    WinClose, Device Manager                             ; Close Device Manager
Return


Note that when a device is disabled, its device family is automatically expanded in the device manager. So, enabling a device is a little different in the 10th line:

Enable Device (WinKey + Z example)

#z::
    Run, devmgmt.msc                                     ; Open Device Manager
    Sleep 1000                                           ; Wait for Device Manager to load, adjust as preferred
    WinActivate, Device Manager                          ; Set focus to Device Manager
    Sleep 100
    ControlClick, SysTreeView321, Device Manager,,,, NA  ; Simulate click on Device Manager (without this, no keyboard input is accepted)
    Sleep 100
    Send {Tab}                                           ; Move focus to the device ListView control
    Sleep 100
    Send {Down}{Down}{Down}{Down}{AppsKey}e              ; No right-arrow as the dev family is already expanded; E for Enable instead of D
    Sleep 100
    WinClose, Device Manager                             ; Close Device Manager
Return


NOTE: If you're using non-English Windows, your shortcut keys for _E_nable and _D_isable may differ -- change as appropriate.

DevCon is much cleaner and easier though. I've attached the x86 and x64 versions (incl. checksums; x86 scan here / x64 scan here) to this post; follow these steps:
  • Extract the desired DevCon version to e.g. C:\Windows\System32
  • Go into Device Manager, select your keyboard device (usu. HID Keyboard Device), right-click and go into Properties
  • Move to the Details tab, and select Hardware Ids from the combobox
  • Right-click the first value in the Value textbox and copy it to the clipboard
  • Paste this hardware ID somewhere for safekeeping, and repeat these steps for any additional keyboard devices (this laptop has two, though only one seems to affect keyboard input)
This is the DevCon syntax to remove a device (include the double-quotes):

devcon.exe remove "HARDWARE_ID_HERE"

Repeat for other keyboard devices if needed; the internal keyboard will now be disabled immediately and completely. To restore the keyboard, use this command:

devcon.exe rescan

You can trigger these commands from a hidden command window in AHK, e.g. WinKey + 0 example:

#0::Run, C:\Windows\System32\devcon.exe remove "HID\VID_0B05&PID_17E0&REV_0249&MI_00", , Hide

HTH.

Offline grav3serker

  • Posts: 251
  • Location: California
  • graves + berserker = grav3serker
Re: Disabling physical keyboard of Laptop
« Reply #10 on: Sat, 07 November 2015, 00:46:05 »
Show Image

This made me laugh. So literal, so metal :thumb:

Offline priyadi

  • Posts: 141
  • Location: Depok, Indonesia
Re: Disabling physical keyboard of Laptop
« Reply #11 on: Sat, 07 November 2015, 02:36:04 »
Under Linux/X11 , I'm using this script to toggle keyboard on and off:

Code: [Select]
#!/bin/sh

KEYBOARD="AT Translated Set 2 keyboard"
MASTER="Virtual core keyboard"

if xinput list --short "$KEYBOARD" | grep -q 'floating slave' ; then
        xinput reattach "$KEYBOARD" "$MASTER"
else
        xinput float "$KEYBOARD"
fi

Then I bind the script to the lock button. With my Thinkpad the lock button (Fn-F3) is on separate logical keyboard, so it is still working after the main keyboard is disabled.
Boards: Filco TKL+HID Liberation, Infinity 60%, Sentraq S60-X, Whitefox, Ergodox, Planck.
Member of the flat keyboard society.
Keycap manifesto: "Key sets without vendor neutral Super key are worthless"

Offline azhdar

  • Praise the AZERTY god
  • Thread Starter
  • Posts: 2444
  • Location: France
  • 65% Enlightened
Re: Disabling physical keyboard of Laptop
« Reply #12 on: Sat, 07 November 2015, 03:16:42 »
Thanks for all the answers guys.
Azerty Propagandiste

Offline heedpantsnow

  • * Esteemed Elder
  • Posts: 3692
  • Location: Orlando, FL
  • Old enough to know better
Re: Disabling physical keyboard of Laptop
« Reply #13 on: Sat, 07 November 2015, 13:51:34 »
Wow that's some good info.  I might need to save that AHK script for future use...
I'm back.

Espresso machine overhaul: https://geekhack.org/index.php?topic=78261.0

Carbon Fiber keyboard base: https://geekhack.org/index.php?topic=54825

Offline SamirD

  • * Esteemed Elder
  • Posts: 1508
  • Location: HSV and SFO
  • on Buckling Springs since '88
    • http://www.huntsvillecarscene.com
Re: Disabling physical keyboard of Laptop
« Reply #14 on: Sun, 08 November 2015, 01:30:20 »
If the laptop has a dedicated ps2 port, a lot of laptops back in the day would automatically disable the built-in keyboard.

Offline azhdar

  • Praise the AZERTY god
  • Thread Starter
  • Posts: 2444
  • Location: France
  • 65% Enlightened
Re: Disabling physical keyboard of Laptop
« Reply #15 on: Thu, 19 November 2015, 10:08:39 »
Bumping because I can't manage to disable it on this W7 laptop. devcon seems to have issue with W7 and this stupid laptop doesn't allow to disable it :

Azerty Propagandiste

Offline dan002

  • Posts: 113
Re: Disabling physical keyboard of Laptop
« Reply #16 on: Thu, 19 November 2015, 11:31:57 »
Why do you need to disable? Is it because the keyboard is sitting on top of the laptops keyboard, and randomly mashing keys?
Peace, love and keyboards.

Offline azhdar

  • Praise the AZERTY god
  • Thread Starter
  • Posts: 2444
  • Location: France
  • 65% Enlightened
Re: Disabling physical keyboard of Laptop
« Reply #17 on: Thu, 19 November 2015, 11:37:26 »
Why do you need to disable? Is it because the keyboard is sitting on top of the laptops keyboard, and randomly mashing keys?

yes & yes.
Azerty Propagandiste

Offline asdfjkl36

  • blue shirt guy
  • * Esteemed Elder
  • Posts: 1764
  • Location: SoCal*
  • --- Click Clacks and Cats --- -- Cyan > Purple --
Re: Disabling physical keyboard of Laptop
« Reply #18 on: Thu, 19 November 2015, 12:16:03 »
Yea I haven't put much effort into finding this out either
All I know is that uninstalling the drivers won't work. It still registers the keyboard perfectly.

Offline azhdar

  • Praise the AZERTY god
  • Thread Starter
  • Posts: 2444
  • Location: France
  • 65% Enlightened
Re: Disabling physical keyboard of Laptop
« Reply #19 on: Thu, 19 November 2015, 12:19:20 »
Yea I haven't put much effort into finding this out either
All I know is that uninstalling the drivers won't work. It still registers the keyboard perfectly.

I tried something like that, you have to disable auto installing of drivers otherwise it just get reinstalled each time.
But it wasn't a convenient as it was also preventing other devices from being auto installed, like usb keys or mices.

Azerty Propagandiste

Offline dan002

  • Posts: 113
Re: Disabling physical keyboard of Laptop
« Reply #20 on: Thu, 19 November 2015, 14:11:41 »
You could build something like this...thing...

A piece of clipboard with some rubber feat because I was concerned of damaging the laptop's keys.
It protects the keys and prevents unwanted mashing.

117769-0
Side view of the thing
117771-1
Top view of the thing
Peace, love and keyboards.

Offline azhdar

  • Praise the AZERTY god
  • Thread Starter
  • Posts: 2444
  • Location: France
  • 65% Enlightened
Re: Disabling physical keyboard of Laptop
« Reply #21 on: Thu, 19 November 2015, 14:14:11 »
Didn't even think of that, that's actually a good idea.
Azerty Propagandiste

Offline MagicSauce

  • Posts: 36
Re: Disabling physical keyboard of Laptop
« Reply #22 on: Thu, 19 November 2015, 14:14:59 »
You could build something like this...thing...

A piece of clipboard with some rubber feat because I was concerned of damaging the laptop's keys.
It protects the keys and prevents unwanted mashing.

(Attachment Link)
Side view of the thing
(Attachment Link)
Top view of the thing

Interesting, I was thinking of something along these lines as well.  I want to try to make a simple one out of acrylic.
Rubber feet is definitely a good idea so the thing doesn't slide around.