Do xinput --list to see your list of input devices, for example:
> xinput --list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Microsoft Microsoft® Nano Transceiver v1.0 id=9 [slave pointer (2)]
⎜ ↳ Microsoft Microsoft® Nano Transceiver v1.0 id=10 [slave pointer (2)]
⎜ ↳ Logitech Optical USB Mouse id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Microsoft Microsoft® Nano Transceiver v1.0 id=8 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=13 [slave keyboard (3)]
↳ UVC Camera (046d:081b) id=12 [slave keyboard (3)]
Find the id of the hardware you want to turn off. For example, if I wanted to turn off my USB mouse, I need to use id 11. I can then do
xinput --disable 11
to disable it and
xinput --enable 11
to reenable it.
If you have a Synaptics trackpad, you can also use the synclient command for controlling the trackpad. I have the following in my openbox rc.xml in the <keyboard> section:
<keybind key="W-q">
<action name="Execute">
<command>sh -c "synclient -l | grep TouchpadOff | grep -q 1; synclient TouchpadOff=$?"
</command>
</action>
</keybind>
If you are lucky enough to have a Synaptics trackpad, this should work for you as well. Add it and run openbox --reconfigure to have it reread its config. If you just want to turn the trackpad off from the command line, synclient TouchpadOff=1 is enough.