TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Chrome 97 is coming today with controversial Keyboard API feature

38 pointsby gardaaniover 3 years ago

7 comments

kronoover 3 years ago
With the conflict of interest being so obvious, the market share so massive, and the amount of controversial decisions increasing both in number and impact - isn&#x27;t it about time for authorities to put some oversight and controls in the Chrome product management processes?<p>Edit: And the same applies to Edge, they shouldn&#x27;t be let off the hook.
评论 #29797261 未加载
iqanqover 3 years ago
&gt;As such, the API change has been classified as &quot;harmful&quot; by Apple and Mozilla, and will not be implemented in Safari and Firefox, respectively.<p>Then people here will say that google docs doesn&#x27;t work well on firefox because google is sabotaging firefox.
评论 #29795475 未加载
评论 #29797306 未加载
ksecover 3 years ago
It is obvious that &quot;<i>Web Page</i>&quot; with interactivity and &quot;<i>Web Apps</i>&quot; are two different things and have conflicting interest.
评论 #29797837 未加载
评论 #29797320 未加载
The_rationalistover 3 years ago
The keyboard api enable to fix vh unit on smartphones
评论 #29795201 未加载
leecommamichaelover 3 years ago
The kind of spyware they’re imagining has been possible since the beginning of personal computers.<p>Given the critics understand this, do they believe the required knowledge to write a native app is too obscure at this point to be considered harmful?<p>I say this because the measurable difference between a desktop keylogger and this is having to run the downloaded program manually. Heck I bet a lot of keyboard manufacturer’s “drivers” do this today.
评论 #29795414 未加载
评论 #29795624 未加载
danShumwayover 3 years ago
I&#x27;m sure there is a use-case for this, but normally when I look at controversial Chrome features it&#x27;s immediately obvious why I&#x27;d want them (risks aside), or at least why someone would want them -- but with this feature I&#x27;m having a hard time imagining what I&#x27;d ever build that would want to use it.<p>Going off of physical locations of keys is pretty bad UX practice for shortcuts as far as I know; we pretty much always want keys to be remappable either in software or at the OS level. Games spring to mind (WASD), but games <i>definitely</i> want remappable keys, and it&#x27;s not clear to me that this (to use a Chrome term that I kind of like) is encouraging developers to fall into a &quot;pit of success&quot; in regards to gaming and user controls.<p>This has popped up occasionally for me where gamepads are concerned -- it&#x27;s nice to be able to provide a sensible default when someone plugs in a controller. But in that situation I care more about just having a default layout then I care about knowing the specific key that was pressed. In that scenario what I actually want is a gamepad &quot;type&quot; string that I can just map to a list of defaults I&#x27;ve pre-configured for that specific gamepad type. In fact, the more I think about it, getting a key code is almost the opposite of what I want in that situation since different gamepads have different norms about what locations should do what and are shaped differently, there isn&#x27;t a universal map. It&#x27;s explicitly the wrong decision for me to say that the top button on the right hand side of a gamepad will always do one thing, because that&#x27;s going to breaking norms on different controllers.<p>And it seems like keyboards are kind of the same? I sort of see the value of a keyboard being able to signal a common layout that has different default shortcuts, but I&#x27;m having a really hard time thinking beyond that why I would want to as a dev override normal shortcuts. Okay, sure, it would be nice to query that a keyboard is in AZERTY layout and suggest different shortcuts. Beyond that?<p>Enough people have asked for it that it must have a use, but even from a gamedev perspective this seems like a strange API to me. The privacy angle is one thing, but I also just have an instinct that this is probably not a behavior that users want from applications. They probably want Internet applications to respect their shortcuts instead of overriding them. And they probably want games to avoid forcing controls based on physical locations of buttons.<p>----<p>From the Github spec:<p>&gt; E.g., If a game supports the standard WASD keys (to move up&#x2F;left&#x2F;down&#x2F;right), then the instructions for the game need to be able to tell the user which keys to press. On a US-English keyboard, they are &#x27;W&#x27;, &#x27;A&#x27;, &#x27;S&#x27;, &#x27;D&#x27;, but for French (AZERTY) layout the user would be told to use &#x27;Z&#x27;, &#x27;Q&#x27;, &#x27;S&#x27;, &#x27;D&#x27;. [...]<p>&gt; Some applications make use of keyboard shortcuts that are based on the position of the key rather than the symbol that is generated. [...]<p>&gt; E.g., a drawing app may have a number of drawing modes arranged from left to right on the screen and may wish to have keyboard shortcuts that correspond to the screen position.<p>I don&#x27;t know, maybe I&#x27;m being unimaginative. But I&#x27;ve dealt with at least the first problem here, and I don&#x27;t think that keymaps are necessarily the best way to solve it. Also, if we&#x27;re talking about games we should be coming up with a solution that maps to controllers as well, so I don&#x27;t really get why we&#x27;re going down this specific route. And the second two use-cases seem like user accessibility bugs, not features. I guess enough devs want it that Chrome is implementing it, but I feel like there&#x27;s something I&#x27;m missing.<p>As a user, I want a user-controlled (or at least OS-controlled) layer between myself and app shortcuts&#x2F;keycodes; it&#x27;s super useful and I customize that layer all the time, even for simple things like rebinding caps-lock. And as a dev I&#x27;d rather not have to try and intuit what setup a user has based on physical locations. Heck, maybe someone toggles into a different layout to game and they use IJKL to move around when they&#x27;re playing web games. Maybe their W key is broken and it&#x27;s bad for me to try and force them to use that specific physical button. I don&#x27;t want to have to think about any of that as a dev, just have the OS signal to me what keys they want me to think they pressed. And if they can signal to me a common string for the overall layout that allows me to give them a sensible default, then great, I&#x27;m happy to do something like that. But this feature doesn&#x27;t seem to make any of that easier, it just gives me a granular map for individual keys and then makes it my problem to interpret.<p>:shrug: I don&#x27;t know, maybe there&#x27;s some nonsense with native behavior that we&#x27;re trying to match or something. I customize my keyboard layout a lot, but I&#x27;ve never jumped to DVORAK&#x2F;AZERTY, maybe there&#x27;s a lot of weirdness with shortcuts there that native apps expect to just paper over, where they bypass the layout? But I&#x27;m not really seeing that online?
评论 #29797910 未加载
评论 #29796989 未加载
poetrilover 3 years ago
Does anyone know if Edge&#x2F;Brave will be implementing this?