News for hackers. Stuff that matters.
Re:Anti-Ghosting by jeromescuggs on Tuesday June 02, 2020 @02:25PM (#23394264)
this is only somewhat related, but i count my old coolermaster masterkeys S as my favorite keyboard of all time, it was nice and utilitarian and came with some absolutely fantastic keycaps - for about 80 bucks. damn shame they "updated" their product lines to appeal to gamers or something, and started taking their cues from corsair and not like, filco.

i have the misfortune of being the guy my friends, family etc call when their computers go bork and one of the little things that just really shine is the easy function-key-shortcut builtin to the board that will swap between windows- and mac style modifier layouts, it wound up being far more than some bellwhistle i initially thought it would be

unfortunately since it was my first real mech it also was something of a guinea pig. i learned to solder switches by swapping them out, and the connections are kinda janked now, and i sometimes have to wack it like an old TV to get it to register certain keypresses.

i'm currently using a durgod TKL, it's almost a suitable equal in all the areas that made me love the CM board.. but man i wish i'd been able to snag another masterkeys, even used, before the supply dried up.

Re:Anti-Ghosting by justin66 on Thursday June 04, 2020 @10:22AM (#23416869)
> i wish i'd been able to snag another masterkeys, even used, before the supply dried up

Are you interested in a Masterkeys S with cherry blue switches?

I switched to a Durgod with brown switches and couldn't be happier.

Re:Anti-Ghosting by lmilcin on Tuesday June 02, 2020 @03:32PM (#23395257)
This is really interesting at the moment where I started to laying out PCB and writing controller for my own keyboard.

After spending some time researching various aspects of keyboard design I come to conclusion that any ghosting or other artifacts are just lazy design.

These could have been explained decades ago when chips where expensive, but today you could technically just as easily devote a single pin to every key. On the other hand if you want to put diodes, surface mount diode cost (ie part + assembly) still pales in comparison to the cost of cheapest mechanical switch.

Re:Anti-Ghosting by skybrian on Tuesday June 02, 2020 @05:08PM (#23396334)
If you don't use diodes, it seems like you'd need a lot of port expanders. For example, I've used the MCP23017 to get 16 extra pins each.

Rather than lazy, you should assume cheap. Consumer hardware is usually optimized to cut costs.

Re:Anti-Ghosting by tokamak-teapot on Tuesday June 02, 2020 @03:40PM (#23395378)
Not being an electronics engineer, can anyone explain why there isn’t just a pair of wires from each key to the controller chip?
Re:Anti-Ghosting by tripletao on Tuesday June 02, 2020 @03:59PM (#23395643)
Because then for 100 keys, you'd need 200 wires, going to 200 pins on a really big microcontroller. But that would be really wasteful, because the switches can obviously all share one common voltage (typically ground) for one terminal. So naively, you'd actually just need 100 pins on the microcontroller plus ground.

But if you put the switches in a 10x10 matrix, then you just need 10+10 = 20 pins, enabling a cheaper micro, cheaper interconnect from the membrane switches to the PCB, etc. That's the benefit, but it comes at the cost of that ghosting (unless you add extra complexity, like a diode in series with each switch). Good keyboard vendors try to lay out the matrix so important key combinations don't ghost, like any combination of modifiers, WASD, etc.

Re:Anti-Ghosting by boogerlad on Tuesday June 02, 2020 @04:35PM (#23395995)
Do you know of any microcontrollers with a development PCB that exposes > 62 GPIOs if I wanted to wire all the switches directly?
Re:Anti-Ghosting by clarry on Tuesday June 02, 2020 @04:49PM (#23396139)
https://www.olimex.com/Products/ARM/ST/STM32-H407/open-sourc...

The alternative that I would suggest you consider is I/O expander chips so you can use any mcu with a handful of pins. MCP23 seems popular, see e.g. https://www.abelectronics.co.uk/p/54/io-pi-plus

https://eu.mouser.com/Semiconductors/Interface-ICs/Interface...

Re:Anti-Ghosting by monkpit on Tuesday June 02, 2020 @06:37PM (#23397301)
Is it just me, or does the article drop the abbreviation “NKRO” at the end with no explanation of the meaning?

Edit: It’s “n-key rollover“

Re:Anti-Ghosting by tincholio on Tuesday June 02, 2020 @02:44PM (#23394601)
Using diodes and a quick enough scan cycle, this is a non-issue.
Re:Anti-Ghosting by mark-r on Tuesday June 02, 2020 @03:17PM (#23395016)
Yes, that solution has been known since at least the 1970's. The cost and complexity of adding all those diodes was an impediment in the old days, not sure how much of an issue it is today.
Re:Anti-Ghosting by tincholio on Friday June 05, 2020 @02:34AM (#23425666)
I did it for a hand-wired keyboard, and the total cost was under 1USD, and no real complexity was added (I just used the diodes as the row wiring, the only thing to keep in mind was having the correct orientation). For modern manufacturing, there's no excuse not to use diodes in the circuit.
Re:Anti-Ghosting by bloak on Tuesday June 02, 2020 @05:23PM (#23396470)
I remember ghosting being a practical problem in the 1980s when people used the keyboard as a game controller.

The other keyboard problem was debouncing. (Glad to see the spellchecker knows that word.) The proper way to debounce would be to have a key switch with three terminals. Cheap home computers didn't do that, obviously. Do modern keyboards do that?

I should have taken one apart last time I had one to throw away. Next time!

Re:Anti-Ghosting by lrsjng on Tuesday June 02, 2020 @01:50PM (#23393843)
What is the technical difference between points 2) and 4)? Why is it in example 2) possible to identify the two keys?
Re:Anti-Ghosting by kps on Tuesday June 02, 2020 @03:16PM (#23394987)
The article isn't very good.

A keyboard is scanned by pulsing each row individually and checking which columns become active because a pressed key connects them. (Or vice versa.)

In (2), when the green row is pulsed, only the green column becomes active, because it's connected to the green row by the pressed key (upper left red dot).

In (4), when the upper of the two green rows is pulsed, both the green columns become active — the first because the upper-left red dot is pressed, and the second because there is a path through all three of the red dots (pressed keys). So the keyboard senses a key press at the dotless intersection, even though that key is not pressed.

Better keyboards solve this problem with a diode on each key, so that the roundabout path can't happen. Cheap keyboards rearrange the rows and columns into squiggly paths so that the three-key pattern doesn't happen very often, being especially careful with the modifier keys.

Re:Anti-Ghosting by lmilcin on Tuesday June 02, 2020 @03:35PM (#23395300)
As I have mentioned somewhere else, I can't explain this by anything else than lazy design. Surface mount diodes are extremely cheap and their cost pales in comparison with the cost of accompanying switch or even LED.
Re:Anti-Ghosting by kps on Tuesday June 02, 2020 @04:02PM (#23395680)
You can't put diodes on a membrane keyboard. (Well, maybe you could, but the side with the traces is right up against the other membrane. Hmm, could you dope the membrane? brb, patenting) And if you did, the cost would still be greater than zero, so it wouldn't fly.

Ghosting on a discrete contact-switch keyboard is inexcusable, of course.

Re:Anti-Ghosting by lmilcin on Tuesday June 02, 2020 @04:40PM (#23396040)
On most rubber dome keyboards there is enough space between rubbers to have diode there. You could also put diodes on the other side of PCB.

I am not sure about costs, though, I did not consider membrane keyboards for my research. Membranes are extremely cheap. Not just because of the membranes being cheap but also because there is no assembly (PCB is contacts, no assembly required for switches) and because there might not be need for double-sided PCB. In this case diodes could force double-sided PCB, vias, and maybe even double sided assembly.

Re:Anti-Ghosting by TheRealPomax on Tuesday June 02, 2020 @01:56PM (#23393907)
Presumably the different colors paired with "so long as the keys in question fall into mutually discrete columns and rows." means they keyboard is actually "several keyboards" at the hardware level, and different keys activate different logic boards for processing.
Re:Anti-Ghosting by burnte on Tuesday June 02, 2020 @01:56PM (#23393903)
Yes, actually, you can still determine the keys. The usual method is to scan the rows and/or columns one by one and then you always only have one row and column active at a time, so you can determine individual keys. However, if you strobe too slow you can miss keystrokes.
Re:Anti-Ghosting by shk1338 on Tuesday June 02, 2020 @02:59PM (#23394796)
By the way, for anyone interested in the "real" keyboards – welcome to the r/MechanicalKeyboards and QMK firmware, you will not want to buy Cooler Master after getting familiar with these resources.
Re:Anti-Ghosting by athorax on Tuesday June 02, 2020 @04:02PM (#23395673)
Might also want to checkout r/Gatekeeping ;)
Re:Anti-Ghosting by bjoli on Wednesday June 03, 2020 @12:57AM (#23399884)
I have a bunch of keyboards. My daily driver is a shitty Alps clone switch boardswith modified click leaves to provide better tactility. I understand going down the rabbit hole of building your own.

However: I want tactility, and with regards to tactility very few switches actually beat good rubber domes. Not rubber domes as in topre, just generally. The switches that do provide tactility (I would say that the matias switches are a good example) have been less reliable than a good rubber dome for a lot more money(at least outside matias' own keyboards).

Also, with a lot of these non-cherry switches I have found binding issues, and as we all know binding is the keyboard antichrist.

The only solution to getting a properly tactile switch I have found to be to buy increasingly expensive switches and build your own board, which I have no interest in whatsoever, or just buying a buckling spring board, where you will get a lovely 2KRO for non-modifier keys (unicomp is updating their process and releasing the "new model m" btw).

After all this, I don't understand the craze for mechanical keyboards. For linear boards there is really no good option, but for typists a good dome board (with slider) will be just as good and cost less than half as much.

Re:Anti-Ghosting by agildehaus on Tuesday June 02, 2020 @04:34PM (#23395987)
I own an MK750. What's wrong with it?
Re:Anti-Ghosting by clarry on Tuesday June 02, 2020 @04:38PM (#23396026)
Doesn't look programmable? If it is, they did a terrible job marketing it. Either way they did a terrible job marketing..
Re:Anti-Ghosting by agildehaus on Thursday June 04, 2020 @11:17AM (#23417761)
Marketing. Just what I look for in a keyboard.
Re:Anti-Ghosting by a_t48 on Tuesday June 02, 2020 @03:09PM (#23394901)
Care to elaborate?
Re:Anti-Ghosting by cryptonector on Tuesday June 02, 2020 @05:14PM (#23396397)
r/MechanicalKeyboards is a sub-reddit dedicated to making custom keyboards, salivating over neat keyboards, and hating on topre.
Re:Anti-Ghosting by a_t48 on Tuesday June 02, 2020 @05:20PM (#23396443)
Wait, "hating on Topre" since when?? https://www.reddit.com/r/MechanicalKeyboards/comments/grapwq... I thought everyone loved Topre.
Re:Anti-Ghosting by cryptonector on Tuesday June 02, 2020 @06:07PM (#23396944)
Heretics abound.
Re:Anti-Ghosting by eyelidlessness on Tuesday June 02, 2020 @01:44PM (#23393775)
Not directly related to the post, but disabling `word-break: break-all` on `.section .ans` made the text a lot more readable for me.
Re:Anti-Ghosting by aarongolliver on Tuesday June 02, 2020 @05:12PM (#23396366)
It's my first time trying something like this, but I played around in the console and if you copy/paste this into it the issue is fixed

document.getElementsByClassName('ans')[0].attributeStyleMap.set('word-break', 'normal')

Re:Anti-Ghosting by eyelidlessness on Tuesday June 02, 2020 @05:25PM (#23396489)
Well, as a long time web dev who's been backend only for a few years now, so my frontend skills are rusty, you taught me something new. I didn't know about `attributeStyleMap`. Way to go first time!
Re:Anti-Ghosting by cryptonector on Tuesday June 02, 2020 @05:21PM (#23396448)
You can find the style using the inspector and then just change. Much faster that way, though not as cool as writing some JS, I admit.
Re:Anti-Ghosting by eyelidlessness on Wednesday June 03, 2020 @11:25PM (#23412037)
Finding it by knowing the dev tools is a technique not everyone has at their disposal. I offered the suggestion of how it could be fixed, someone provided a copypasta to do it for everyone regardless of familiarity with the dev tools. That should be applauded!
Re:Anti-Ghosting by aarongolliver on Friday June 12, 2020 @03:13AM (#23496839)
Thank you for this. I thought the usefulness of being able to press "ctrl-c, f12, ctrl-v, enter" would be self evident.
Re:Anti-Ghosting by surround on Tuesday June 02, 2020 @02:28PM (#23394306)
It’s nearly impossi

ble to read on mobi

le. Luckily, most b

rowsers have some s

ort of a “reader mo

de” which solves th

e problem.

Re:Anti-Ghosting by game_the0ry on Tuesday June 02, 2020 @04:23PM (#23395897)
As a front end engineer, I can't believe what I am seeing. Someone got paid to make that. They looked at the finished outcome and said, 'eh, good enough to deploy to prod.'

If that's how bad they are at web design, I wonder how bad their products are.

Re:Anti-Ghosting by eyelidlessness on Tuesday June 02, 2020 @05:30PM (#23396545)
Hey now, try not to crap on the work of people whose circumstances you don't know. A quick glance at the HTTP response shows the page is served by Plesk. It's often the case that off the shelf software like this is selected, along with a "nice looking" theme, by someone with no technical background. And it's also often the case that said "nice looking" themes have not been built to accommodate the use case they're applied to.
Re:Anti-Ghosting by game_the0ry on Friday June 05, 2020 @08:11PM (#23435469)
You're too kind, my friend.
Re:Anti-Ghosting by projektfu on Tuesday June 02, 2020 @04:55PM (#23396200)
Someone made the explicit decision to break in the middle of words without hyphenation. Very strange. Or, they reused something without any idea what it did.
Re:Anti-Ghosting by renewiltord on Tuesday June 02, 2020 @06:41PM (#23397350)
Wouldn't it make sense that they're better for being bad at the non-critical stuff? Assuming the market will pay X for their goods, mostly dependent on the goods' quality Q and very little on W. Assume that it costs Y to build the product (and that higher Y leads to higher Q) and Z to build the webpage (and that higher Z leads to higher W). Assume that they want the profit to be as high as possible. Then they'll want Y+Z to be as small as possible, and you would hope that most of that cost-cutting is in Z so that Y+Z is as close to Y as possible.
Re:Anti-Ghosting by rangibaby on Tuesday June 02, 2020 @10:27PM (#23399050)
That property is a feature for East Asian scripts, they probably made it look right in those languages and didn’t notice the regression in Latin script
Re:Anti-Ghosting by cryptonector on Tuesday June 02, 2020 @05:18PM (#23396431)
Yay browser consoles.