Hacker News new | past | comments | ask | show | jobs | submit login
DIY mechanical keyboard switch lets you set its actuation point (arstechnica.com)
66 points by Tomte on Sept 6, 2022 | hide | past | favorite | 77 comments



At this rate, soon each switch will have a programmable controller inside, and you'll have drivers adjusting them as you type.

Thought idea: predict what key you are about to press next, and make the ones around it stiffer so you are less likely to press them by mistake.


  > Thought idea: predict what key you are about to press next, and make the ones around it stiffer so you are less likely to press them by mistake.
If the bottom magnet were an electromagnet, then in fact one could make the keypress stiffer. As it stands, this project only changes the actuation point, but not the stiffness curve.

That said, I would love the feature that you mention. It could possibly introduce a new feedback concept to programming, similar to e.g. the shaker sticks that airline pilots are familiar with. Or, one could reduce the stiffness after a long day at work. Or increase the stiffness when the IDE detects e.g. that you're accessing a string position beyond bounds, or your SQL query is not parameterized but contains a concatenated user input.


With an electromagnet, you could take that control of feel far enough give it a buckling-spring ‘click’ feel.


You might also need active cooling to be able to pump enough juice through your electromagnets to get the desired force.


The force for a cherry red switch is only around 50g. A brake, rather than direct electromagnetic force, could be used most of the time (see Playstation 5 controller [1]).

Regardless, this will be one expensive keyboard.

1. https://hackaday.com/2021/09/13/how-the-ps5s-genuinely-cleve...


Interestingly the iOS keyboard does this, it makes the touchzones for letters you're more likely to type larger.


Recently, a few brands (Wooting, Razer, Steelseries, etc) have introduced keyboards with analogue-capable input (using either hall-effect, like the switch in the article, or optical sensors). This already allows the actuation to be set per-key in software, so your idea probably wouldn't even be that hard to implement with today's hardware! (although you may need a beefier microcontroller on the board)


My very first computer, Nascom-2, in about 1981 had Hall effect keys. It was the best keyboard I have ever used :-(


The iPhone keyboard actually does something similar by dynamically expanding tap zones:

https://www.youtube.com/watch?v=wPmVKyhyl9U


Already halfway there with the Dumang DMK6. — each key is movable, hotswappable, magnetic, and programmable.


On the "adjusting them as you type" front, the Wooting keyboards already support detecting a key retrigger even without a full release. They are monitoring key position and if you start to release and then push again they can make it trigger a new keypress.

I agree that having a software defined key-press resistance would be amazing. If you could manage that and then add in haptic feedback to simulate standard mechanical keyboard actuation clicks...


That sounds like a nightmare x) my keyboard deciding that I shouldn't get to type what I want sounds very frustrating.


Every smartphone already does this.


It actually makes sense to measure a linear scale of pressure instead of a single click, with a smart driver that knows if its a key you typically hit hard or gently eg d (index finger) vs z(little finger).


If you want something you can actually buy, check out the wooting he

https://next.wooting.io/wooting-60he

You can set per key actuation points, and bind multiple different inputs to the same key but different depths, etc.

Great review here

https://m.youtube.com/watch?v=glQNEbh79xg

You can even mod it into another case for the DIY crowd.


I used it for a midi keyboard and it was fun


Can it detect speed or force? I googled, and it seems to be a binary sensor.


I believe it measures distance, so possibly speed as well, and force could be computed with knowledge of spring resistance. However, I don't think I saw anything in their material relating to these two terms.


Cool, I've dabbled in this with ordinary mechanical switches. What's the hardware interface like for the Wooting switches?


I believe it's custom, because the mechanical part is actually just part of a sensor (it's just a magnet in a slider). The other part is the hall effect sensor which is soldered on the board. So, you can't drop these mechanical parts on to another board, they aren't self contained switches.


>Fans of Hall-effect mechanical switches note that they should last longer than traditional mechanical switches since they don't rely on metallic contact, which can result in degradation.

Has anyone ever typed so much on a keyboard that the switches wore out? Aren't they good for literally millions of actuations?


> Has anyone ever typed so much on a keyboard that the switches wore out? Aren't they good for literally millions of actuations?

There are always non-zero odds that equipment deteriorates to the point it ceases to function, and failures due to wear increase with use.

https://en.wikipedia.org/wiki/Bathtub_curve

I had a keyboard fail on me because the spacebar ceased to trigger reliably. It was a cheap Chinese "let's shove a cheap laptop keyboard in an even cheaper plastic chassis to make it a small form factor USB keyboard". It took a couple of years of daily use but eventually the switch was kaput.

Also, arguably the most famous case of keyboards failing is Apple's infamous MacBook pro keyboard and it's propensity for phantom key presses.


> Has anyone ever typed so much on a keyboard that the switches wore out? Aren't they good for literally millions of actuations?

Yeah. Several. The keyboard might claim it's good for millions of actuations, but I write as well as program. At the end of the editing process, I have roughly 80,000 words entering the public sphere, a month. Excluding all rewriting. Imagine the abuse the spacebar has seen by the end of that.

It doesn't take much to scale that out to be murderous on cheaper keyboards, and serious wear and tear on the tougher ones.


A keyboard doesn't claim to be good for millions of actuations. You're referring to (a single) switch, which cost less than a dollar even for the most premium switches. They are easily replaced.


I don't know if 'worn out' is the correct term, but I've definitely typed my way through a few x220 keyboards. It just takes one dead key for the whole keyboard to be useless.


>Has anyone ever typed so much on a keyboard that the switches wore out?

Sure, somewhere in my collection of "stuff" there still rest two Cherry keyboards (mechanical, gold contacts) where certain keys stopped working reliably, the vowels a or e, IIRC.

They rest (instead of being disposed off) because I plan(ned) to open them sometime in the future to check if they malfunction due to corrosion, dirt or just mechanical wear.


Although the answer is literally yes, it is meaningfully no.

I have a keyboard that uses plate mounted Cherry MX reds, not lubed, pre re-tool (so the stems are a smidgen wobbly), and otherwise unremarkable. It is now 10 years old.

None of the switches have failed, and the most I had to do was replace the stock PBT keycaps with new ones because I had worn them down until they were smooth (very undesirable to type on). These keycaps seem to be better than the stock ones (a really cheap set of doubleshot-thick but dye sub colored I got for $30-some), and probably is at least another decade before I have to do it again.

I am probably past the million mark on important keys like WASD or space.


In the opposite direction: I had a keyboard once that I set aside for a couple of years and when I tried to use it again some of the keys didn't register reliably. It took a couple of days of use before everything worked smoothly.


Sounds like contact corrosion (assuming it was a mechanical keyboard)


I have a 5yo Cherry MX keyboard, and the rarely used keys (Scroll Lock, Pause, numpad) have a somewhat more defined feeling when they actuate than the most commonly used ones. The difference is subtle, but it's there.


That's probably the spring mechanism wearing out - the actual electrical part is still working properly.


That's also the part that isn't worn out under this hall effect approach; the keys are magnetically levitated.


Unfortunately a magnetic approach alone won't easily give a suitable force Vs displacement curve for a keyboard. The affirmative 'clunk' feeling as a key goes down isn't easy to replicate with fixed magnets


The key stems in a hall-effect key switch still use a spring. The magnet is not providing any (effective) movement resistance or levitation. It's there simply to provide the magnetic field for the sensor to measure.


I've seen keys fail after heavy use, but so far all of them have been the solder joints connecting the switch to the circuit board giving up.

Mouse switches on the other hand...


Logitech of all manufacturers failed in this big time with their G1 gaming mouse. Press and hold can intermittently show as a released button, very much fun when dragging lines in Fusion 360 and then asking myself why the line is not continuous.


Millions of actuation might sound a lot, but you can reach those within a couple of months while gaming. Dirt ingress also can easily kill a switch. On my mice and trackballs I have to replace the micro-switches every 3-5 years, as they'll develop unintentional double-clicks, and that's without any fast paced gaming.


If your time permits, this should give you a clear image on switches vs marketing https://www.youtube.com/watch?v=v5BhECVlKJA


That's a very interesting video. Thanks.


Not complete failure. But things like unreliable detection or double-detection, yes.

But in my case those happenend a lot sooner than their projected lifespan.


I've worn out at least two MS Ergonomic keyboards, I'm I'll diligently working on my third. I've worn out two Matias Pro Ergo keyboards, and another one will probably replace this MS board. I've worn out quite a few Cherry and Cherry-compatible switches, but I've been able to replace just the switches in those cases.


My 2016 laptop's keyboard wore down last year (only a few keys, but that's enough to make it unusable).

BTW it's a very nice gaming laptop and it's pretty good quality, I'm still using it with an external keyboard, I'll probably replace it next year.


My current brown switch keyboard has lost all tactile bumps after 3+ years.

In the past, with starcraft apm spams, i definitely have experienced switches defects(dust collect over years, hard to repair) and keycaps defects on some of the more frequently used keys.


I had to replace a full set of Gateron switches because a growing number of my keys wouldn't input anything when pressed. They had come to feel mushy and didn't have the distinctive 'click' sound anymore.


I think it has more to do with how hard some people type, rather than how much; I've never worn out keyswitches but heard of plenty of others who did. Yet I've definitely typed more than several megabytes of text.


I've worn out 3 switches on a model M.


I recently had to replace a switch on my board, so it can happen.


Ooh I want a set of these which replace the bottom neodymium with an electromagnet coil. Keeb circuit boards for swappable switches almost all have extra traces for RGB which can be repurposed.

Complete control over the full range of force? Yes please!

But let's be real: I actually want my keyboard to start typing out of nowhere like a freaky sorcerer's apprentice thing.


Lol a version of autohotkey that physically depresses the keys would be super fun to play with, albeit slow


I can imagine this feels quite odd to type on. The force-distance curve between two magnets is very different from that of a spring --- the former is quadratic, the latter is linear.


Next step: Add a tiny motor inside the key switch for force feedback


I think force feedback (and or haptic feedback) is truly the future of interaction design.

To see an amazing example of this, check out the smartknob project: https://github.com/scottbez1/smartknob


Back around 2000 we had numerous force feedback joysticks, mice and steering wheels on the market, but only the steering wheels survived due to having a niche with sim racing. Joystick disappeared largely due to games switching to gamepads. Not quite sure why nobody ever tried to replicate the Logitech iFeel mice, that seems like a simple and cheap enough feature add into any mouse, especially these days with phone rumble motors being available for pennies. I quite liked the way the Nintendo Wii would give little haptics clicks when you moved the cursor over clickable UI elements, I'd imagine iFeel was similar, never tried it myself back then.


This is one of the coolest things I've ever seen, thanks for sharing!


This knob would be nice as an alternative "zoom in/out" knob for users of Wacom tablets, since you don't have the scroll wheel of a mouse.


It needn't be a motor , it could be a solenoid - magnet combo configured to repel , with a microcontroller that varies the current position dependantly to immitate any profile one wants


The time-honoured quick and dirty approximation to that is to add a single solenoid to the keyboard and have it actuate every time a key actuates: https://youtu.be/1qw6ebySet0?t=305


That's what I was expecting.

It's not a mechanical keyboard switch, anyway. There's nothing to click. No moment when the force required decreases.

These keyboard enthusiasts should look into making replacement car dashboards. Something tactile to replace those awful touchscreens that keep people's eyes off the road.


The "mechanical keyboard" label is mostly arbitrary. Only somewhat reliable definition that matches with how it's widely used in context of keyboards that I can think of is "everything except, rubber dome, touchscreen and capacitive button keyboards (the ones without any moving parts, not the ones where keycap+spring moves one of capacitive surfaces)". Any attempts at defining it based on meaningful physical construction element or property will likely result in rubber dome keyboards classified as mechanical or some of the switches in "mechanical keyboards" as not mechanical.

According to your definition about point where force decreases -> half the mx keyboard switches are not mechanical because they are not clicky and have linear force curve without buckling point, but the rubber dome keyboards are "mechanical" because they have a point where dome buckles and force decreases.

If you look at the nature how the electrical contact or signal is made. Again rubber dome keyboard actually mechanically connect and disconnect the electrical contacts. But the few commercial "mechanical keyboards" using optical or magnetic switches which from the mechanical construction is almost identical to "real mechanical keyboards" would fall on the other side of split.

That said there is some use in classification of switches outside the context of keyboards based on whether they have any moving mechanical parts, or whether they contacts which get connected/disconnected during use and could increase resistance over time or spark in case of higher voltages and currents have their use in certain situations.


I use Cherry MX blacks, they also have no click (just like Silver, Red).

The advantage of auch a thing is that you can type them silent if you like. More silent than a typical laptop keyboard in fact. Being someone who does audio recording a lot this was the selling factor for me.

The lack of click is actually quite fine, I have no problems with it. You still have the spring you push down, so gaining a feeling for "when you hit it" is not that hard.


> It's not a mechanical keyboard switch, anyway. There's nothing to click. No moment when the force required decreases.

What you describe is called “tactility” and there is another DIY magnetic switch design that offers it, using three magnets instead of two:

https://hackaday.com/2022/01/17/3d-printed-magnetic-switches...


And an idle mode where the keys gently undulate like a infestation of bugs


Isn't this what the trigger's on the latest generation game-controllers do? Create dynamic resistance (and force feedback) on the trigger.


Solenoids, probably.


seems like wasted potential by not reading the sensors with an ADC. you could have analog keys this way, which opens up a whole new world.


I assume you are referring to the part where article says that (hall effect sensor) "output being used to trigger MOSFETs". I have no idea where that came from, but in the schemeatics and code I looked at hall effect output was read using ADC like you would expect. Otherwise how else would you change the actuation point? You could digitise it by comparing it against adjustment pot with a discrete comparator IC, but that seems like 80% of hassle with 20% of functionality. Sample keypad in the linked repository doesn't do that. Either I am looking at different repository or Arstechnica writer blindly copied from the hackaday article, and hackaday writer was half asleep while reading schematic so wrote complete nonsense.


I haven't looked at the schematics but I suppose you could set a trigger level with the mosfets? Past a certain threshold it turns on the fets.


For a macro pad, maybe. For a full-sized keyboard, that would be a lot of ADC channels. Looking at Digikey, ADC chips seem to be about $0.50 per input in bulk, and that would add a lot of BOM cost to the keyboard.

You might be able to do better if you instead feed the Hall output into a sample-and-hold filter constructed out of a much cheaper op-amp. I suspect that would be an interesting engineering challenge.


Couldn't you mux them?


Look at the Wooting keyboards. They do this. I'm sure there are others.


This was developed by HN user riskable and recently mentioned here:

The obsessive pleasures of mechanical-keyboard tinkerers - https://news.ycombinator.com/item?id=32623908


steelseries apex pro keyboards have these sensors

they're great if you use the same keyboard for gaming and actual work

(beware though: linux support is non-existent, although you can control the keyboard entirely without the shitty steelseries software)


I've been using the apex pro TKL variant for 3-4 years now, it's an amazing keyboard! Would recommend it!


Very interesting! A few months ago I was toying with the idea of using a permanent magnet in the stem and permanent/electromagnet at the bottom for adjustable weight / position sensing.

While it works in theory, in practice the feeling of magnet-on-magnet force curve feels really unnatural for typing (since it's not linear like most springs). Maybe some combination of both approaches would work better in my case.


It was my understanding that by keeping the magnet in opposing field for long time makes it loose magnetism or worse reverse the polarity.


Yes. It takes quite some time, though.

There are hall effect switches from the 60s that still work.

Edit: oh, this uses a magnet instead of a spring. That might cut the neodymium magnet lifetime short. I wonder how much..


Can the Hall-effect sensor detect speed or force? I'm more interested in building a midi keyboard.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: