DEV Community

Cover image for HTTP 468 - Keyboard Required (Meme HTTP Code)

HTTP 468 - Keyboard Required (Meme HTTP Code)

Yan Levin on June 25, 2024

Introduction In today's world of sleek touchscreens and voice assistants, you'd think we've moved past the humble keyboard, right? Wrong...
Collapse
 
schmoris profile image
Boris

// Logic to determine if the client has a physical keyboard

That would have been the interesting part 🤓

Collapse
 
henrywoody profile image
Henry Woody • Edited

I've looked into this in the past on the client-side and found this question: How do I detect hardware keyboard presence with javascript?, but it doesn't have any great answers. The lowest-score answer might actually be the best answer:

if (confirm('Do you have hardware keyboard?')) {

} else {

}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
schmoris profile image
Boris

Lol, love this one!

Collapse
 
skyzerozx profile image
SkyZeroZx • Edited

I think is possible detect with user agent of certain device how mobile ?

Collapse
 
michaelmior profile image
Michael Mior

A mobile device can have a physical keyboard connected.

Collapse
 
p12y profile image
Peter Tyldesley

Yep. Instead what we got was a tutorial about how to return a status code in express.

Collapse
 
luna_dev profile image
Luna

My favourite HTTP code is still:
418 I'm a teapot

developer.mozilla.org/en-US/docs/W...

Collapse
 
ashleyd480 profile image
Ashley D

Oooh excellent share @m_midas. We were learning last month in bootcamp about error code specific to calls to endpoints from the frontend. Love this nifty error status you shared for where keyboard is required, as well as the code snippet so we can see how it's implemented. 🦄

Collapse
 
risha_mason_45d3b388851f8 profile image
Risha Mason

Hah this is so funny

Collapse
 
khuongduybui profile image
Duy K. Bui • Edited

EDIT: There is a #jokes tag that I missed. Well-played.

I can't tell if this is supposed to be a prank (like April's Fools), a proposal, or guide.
If a prank, it should be noted somewhere.
If a proposal, dev.to this is not the best place to propose HTTP standards.
If a guide, this is a misleading guide as many other folks have pointed out.
And finally, the linked GitHub repo does not contain any code.

Collapse
 
m_midas profile image
Yan Levin

Can’t get kind of code are you expecting on meme HTTP code.
I’ll mark additionally that its meme code. Thanks

Collapse
 
khuongduybui profile image
Duy K. Bui

I missed the #jokes tag lol

Collapse
 
crazytonyi profile image
Anthony

"452-499 Unassigned"

Doesn't sound official. Probably for good reason.

This puts a huge limitation on a site or web app, very similar to the dark ages when sites wouldn't load because the browser wasn't IE because the development backend was "just trying to avoid problems"

It's really none of your business as a developer if someone wants to play a keyboard based game from their mobile keyboard. Or write a novel. Or anything else. If they struggle to do so and continue to do so anyway, that's their decision, not your problem to solve.

You really run into the risk of being ableist with this mindset. Many people code with non keyboards because they physically can't use a keyboard. When you force a site to use a keyboard, you block out groups of people.

Collapse
 
m_midas profile image
Yan Levin

HTTP 468 is a humorous status code. In real applications, of course, stick to official codes.

As for limitations and IE: sounds like some traumatic memories there. We've all been through that, but it doesn't mean physical keyboards are bad. Yes, everyone has their preferences, but sometimes it's worth reminding that sometimes playing games on an on-screen keyboard is like trying to hammer a nail with a banana.

Collapse
 
normanc8 profile image
Tom C. • Edited

So this is how search engines get poisoned with b*s.

It's sad dev.to provides 5 ways to cheer but none to call out nonsense posts.

Collapse
 
khuongduybui profile image
Duy K. Bui

You can report to moderators, they can mark content as low quality for further reviews.

Collapse
 
p12y profile image
Peter Tyldesley

If you have to use the client to check if the client has a physical keyboard, there's literally no point to the server side code in your example.

Collapse
 
m_midas profile image
Yan Levin

The major point is about status code, not the code in the example