WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
18357
[GTK] Enter on buttons doesn't work
https://bugs.webkit.org/show_bug.cgi?id=18357
Summary
[GTK] Enter on buttons doesn't work
Marco Barisione
Reported
2008-04-08 02:55:03 PDT
It's possible to navigate among links and widgets using TAB and shift-TABS but then it's impossible to emulate a click on a button using the ENTER key.
Attachments
Set the text of the event to '\r' when the return/enter key is pressed
(1.85 KB, patch)
2008-04-08 03:06 PDT
,
Marco Barisione
ap
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Marco Barisione
Comment 1
2008-04-08 03:06:49 PDT
Created
attachment 20402
[details]
Set the text of the event to '\r' when the return/enter key is pressed Note that I used '\r' instead of '\n' because it's what WebCore use. Probably it's better to use '\n' modifying WebCore to allow this, but I think there could be a lot of places in WebCore where the code assumes that enter is '\r'. What do you think?
Alp Toker
Comment 2
2008-04-17 17:22:48 PDT
(In reply to
comment #1
)
> Created an attachment (id=20402) [edit] > Set the text of the event to '\r' when the return/enter key is pressed > > Note that I used '\r' instead of '\n' because it's what WebCore use. Probably > it's better to use '\n' modifying WebCore to allow this, but I think there > could be a lot of places in WebCore where the code assumes that enter is '\r'. > What do you think? >
Yeah. While this fix looks like it'll work I think it'd be great to investigate if this can be fixed better in WebCore. Marco: It's up to you. I can land this patch if you're willing to follow it up with a proper fix (if necessary), or I can leave it out till we get a better idea of how to proceed. It might be worth talking with ap (Alexey) about this one, he has a good eye for input issues.
Alexey Proskuryakov
Comment 3
2008-04-17 23:56:49 PDT
Comment on
attachment 20402
[details]
Set the text of the event to '\r' when the return/enter key is pressed It's surprising that gdk_keyval_to_unicode doesn't handle these keys - what is the story behind this? I couldn't find any hints in documentation. Are there any other keys that need to be special cased? Yes, it is correct to use \r here - JavaScript code on the Web expects to see 0x13 in keypress.charCode, so this is not just internal to WebCore. I have noticed that windowsKeyCodeForKeyEvent doesn't handle GDK_ISO_Enter and GDK_KP_Enter - this looks worth fixing, too. r=me
Marco Barisione
Comment 4
2008-04-18 03:41:30 PDT
(In reply to
comment #3
)
> It's surprising that gdk_keyval_to_unicode doesn't handle these keys - what is > the story behind this? I couldn't find any hints in documentation. Are there > any other keys that need to be special cased?
I don't know (I will ping someone on IRC about this) but probably it would return \n not \r, so we would need to special case it even if gdk was changed. Alp, can you commit the patch?
> I have noticed that windowsKeyCodeForKeyEvent doesn't handle GDK_ISO_Enter and > GDK_KP_Enter - this looks worth fixing, too.
Opened another bug on this (
bug #18576
).
Alp Toker
Comment 5
2008-04-19 19:50:43 PDT
Landed in
r32246
. Barisione, can you open another bug if there are other places this needs to be fixed or if it turns out we can fix this in a better place? Cheers
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug