17

We would like to make an interactive exhibition piece foolproof, requiring as little staff presence as possible when recovering it from anything anyone made it do.

It has a text input and then it outputs something. I figured the easiest would be to not give them a mouse at all, just a keyboard that is always focused on the single input field. And then disable every shortcut and special key possible, remaining only with letters, space, backspace and enter.

We are flexible in terms of OS and wether the UI is a HTML page or a desktop app. But obviously windows (or a standard linux distro) and a HTML page would be best. We may need GPU drivers for the backend.

Tried googleing around, but maybe I haven't stumbled on the right keywords, because we are not the first ones having this problem. But then again, most interactive exhibits are very poorly secured.

9
  • 22
    Seems like a perfect case for Kiosk mode.
    – Ramhound
    Jun 29, 2022 at 13:43
  • 5
    I would think that using e.g. an arduino device for pure text input that filters and sends the text to the computer would separate the user from the OS and obviate the need for locking down the computer. Sort of a dumb terminal device with no meta command functionality (nor display). The computer would have a service that listens on a port for the text, so no "focus changing" or interactivity required
    – Yorik
    Jun 29, 2022 at 15:30
  • 1
    Windows 10 Enterprise (or Edu) has a feature that does exactly this
    – 9072997
    Jun 29, 2022 at 21:15
  • 2
    The Hasu Usb-to-Usb Converter adds QMK support to any USB keyboard, and would let you do exactly what @yorik was suggesting in the earlier comment re: filtering the keyboard.
    – larsks
    Jun 29, 2022 at 23:41
  • 3
    No digits? Via the registry, you could remap every key you want to disable to Null, so it becomes a dead key. The relavent key is 'HKLM:\SYSTEM\CurrentControlSet\Control\Keyboard Layout' amd you create a REG_BINARY value named ScanCode Map. I have some PowerShell code to assist in the cfeation if you're interesetd in this aaproach. Jun 30, 2022 at 7:46

8 Answers 8

17

What you're looking for is called "kiosk".

Depending on your budget you could buy or rent a dedicated machine. They are called "interactive kiosk" or "kiosk computer". They come with a fairly safe touchscreen or sturdy builtin keyboard. Often they have a trackball.

If you consider it to be too expensive and want to spend time instead, you should take a dedicated operating system like Porteus Kiosk that allows you to disable everything you'd want to disable and restores the computer to initial configuration on every restart even if someone manages to screw it up. But you'd have to manage hardware safety yourself — lock the tower in some enclosure, prevent vandalism as needed and so on.

But obviously windows (or a standard linux distro) and a HTML page would be best.

Sorry, I don't think any standard OSes are suited for this role. But the app itself can surely be a web app (i.e. an HMTL page) and that's probably the easiest and most supported option that would be supported be nearly any kiosk solution.

30

Remove all the 'illegal' key-caps & mount the keyboard behind a cutout so only allowed keys are exposed.

No 'illegal' keys available to press, no need to do anything special to the OS. You keep your supervisor keyboard behind the scenes.


I used to work with 'multimedia' displays for retail. In retail you quickly discover that the only way to stop the public messing things up is to remove literally all access that can mess it up. We used to mount keyboards like this in made-to-measure steel cases, bolted down. Anything less & someone would manage to break it or steal it. Don't buy a flimsy keyboard, or a skinny one people can easily flip the key caps out of… or they will.

Note that amongst the things people like to do, other than just steal all the key caps, is - delete your app &/or anything else they can get to. Change the desktop picture to something really, really inappropriate… or my favourite… set a supervisor password, thereby locking you out of your own machine.

Anecdotally, the funniest one [& very expensive for the company involved because they wouldn't let us VPN into the system so it always had to be an on-site visit, for which we charged them a fortune] was that the customers couldn't break it but the staff could. The staff would wonder why it didn't have internet access. They'd 'cleverly' spot DHCP was off & enable it. That would break the entire structure, so they had internet [which it wasn't supposed to] but their app wouldn't work, as it was hard-coded to their own internal server, 10 yards away in the office. Oh how I laughed every time… & took the money to 'fix' it which took, of course, about 30 seconds.

5
  • 1
    Custom (colored) key caps could also be an option. So if you are only pressing WSAD for instance, color those (RED,GREEN,YELLOW,PURPLE) with an icon or something necessary to indicate it's function.
    – Ramhound
    Jun 29, 2022 at 13:43
  • 2
    If you didn't get a really tight fit on the cutout this could be bypassed with a cleverly bent paperclip
    – 9072997
    Jun 29, 2022 at 21:19
  • 6
    Slightly pricy option would be to buy a firmware programmable keyboard - something that runs QMK or Via. If you get a 60% keyboard, many of those keys are not even there. You can then set the keyboard in hardware to only support the keys you want. If you have a hotswap mechanical keyboard you could also remove the actual switches for certainty and to lower the profile, and maaaaaybe superglue or carefully epoxy keycaps to the switches?
    – Journeyman Geek
    Jun 30, 2022 at 2:04
  • Changing the wallpaper I can 'understand', but setting a supervisor password is proficiency and malintent together. Never thought someone would go that far. BTW thank you for the answer, it is really simple and effective one. Still it is a hardware solution to a software problem, probably we will go with a kiosk mode (either Linux or edu Windows) OS setup.
    – alparius
    Jul 5, 2022 at 23:46
  • alparius - schoolkids. Just enough knowledge to be dangerous. Most damage would occur just after the schools finished for the day.
    – Tetsujin
    Jul 6, 2022 at 6:02
11

If it fits in your budget you could also consider using a touchscreen and developing a simple JS keyboard

2
  • 1
    I experienced many times, that this alone is probably not a solution, but this running in kiosk mode is definitely something to consider.
    – alparius
    Jul 5, 2022 at 23:51
  • @alparius why wouldn't it be a solution? (I'm assuming that with this option the terminal would have no mouse or keyboard, and the page would be fullscreen)
    – miniBill
    Jul 6, 2022 at 0:04
9

I've done something like this in order to use a USB number-pad as a custom control input for a piece of software.

Basically, rather then dealing with OS protections or other options, open the "safe" keyboard directly with libusb.

That gives you a full keyboard with a (relatively) simple interface, that literally cannot interact with anything but your specific application. When I did this, I masked the specific keyboard from the platform HID drivers by VID, so it wouldn't show up as a normal keyboard if my software wasn't running.

You can configure windows and/or linux to use libusb for specific USB VID/PID tuples.

Accessing the system in non-kiosk-mode is as simple as just using a keyboard from a different manufacturer, or with a different part-number.

3
  • We probably will not end up doing this, but this is completely new to me and I absolutely love it. Sort of thing that will either come handy in 5 years, or just a cool thing to tell someone.
    – alparius
    Jul 5, 2022 at 23:56
  • @alparius - it's not exactly trivial to do if you haven't dealt with embedded/libusb stuff before. I wound up with this solution because it was in a project that also had a custom USB device, so it was not a lot of additional complexity. .
    – Fake Name
    Jul 6, 2022 at 9:08
  • Oh yes, that much was obvious that this would be rather complicated. What I wrote I meant in the sense that this is a very interesting concept.
    – alparius
    Jul 7, 2022 at 11:07
6

You could use the Linux DRM API to draw directly to the screen using e.g. libcairo (Which has font-rendering support), intercept input events with libinput, and disable all vttys. Probably overkill, but it will give you full control over your software stack, preventing the abuse of keyboard-shortcut, visiting of malicious websites, opening of applications, etc. From what I have heard from people in the industry, some car manufacturers and advertisement billboards use this method, amongst others.

6

This could be a good use case for one of the embedded versions of Windows.

Windows 10 IoT Core is a stripped-down, minimalistic build of Windows that only allows a single, pre-defined UWP program to run in the foreground. There's no taskbar or desktop, so it's not even obvious that you're running Windows. You'd design your program to run fullscreen, and the system would boot straight into it at startup.

The various IoT flavors of Windows also have a number of other features that may be useful for your use case (some features only available in certain editions):

  • Unified Write Filter - prevent writes to the hard drive. Writes instead go to a virtual overlay which gets cleared on reboot. If someone messes up the system, simply reboot and you're back to normal.
  • Keyboard Filter - block certain key presses or combinations.
  • Shell Launcher - use your program as the OS "shell" instead of the normal desktop/taskbar. When the program terminates, it will be re-launched.
2
  • 1
    I think UWP apps only come from the MS store
    – Irsu85
    Jul 1, 2022 at 17:25
  • @Irsu85 You can install them directly as well. The IoT builds of Windows don't support the MS store.
    – bta
    Jul 11, 2022 at 23:00
1

As other people mentioned, a "Kiosk mode" will be useful. With this answer, I'd like to recommend a specific product.

Find here the Safe Exam Browser: https://safeexambrowser.org/download_de.html

With this browser, you can easily switch the kiosk mode on and off and you can configure it.

There is an alliance of several universities and other insitutions behind the development. I used this browser while I was working in a University between didactics and media a couple of years ago.

The browser is considered a safe thing, however in rare cases somebody finds a security hole, like it recently happened:

https://www.zentralplus.ch/beruf-bildung/15-jaehriger-zuger-erhackt-sicherheitsleck-bei-pruefungsplattform-2388863/

I hope, this browser brings your project forward.

0

The "easy way" is to use xmodmap. I suspect this might be easily defeated by someone, but I don't know how, so if you know how, please comment.

Quick start:

$ xmodmap -pke > xmodmap-existing
$ xmodmap -pm > xmodmap-existing-modifiers
$ cp xmodmap-existing xmodmap-restricted
$ vi xmodmap-restricted

Using vi or your favorite editor, change all keys you don't want to NoSymbol or space or something. Also disable the Crtl/Alt/Windows modifier keys by adding at the beginning:

clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
clear Control

Then apply the restricted keyboard:

$ xmodmap xmodmap-restricted

The changes take effect until either you restart (easiest) or return to the original setup using xmodmap xmodmap-existing. (To undo the clear of Ctrl/Alt/Windows modifier keys, you'll need to add at the end some lines like add Control = Control_L Control_R. Refer to the earlier output from xmodmap -pm to get the correct modifier codes for your specific setup.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .