/    Sign up×
Community /Pin to ProfileBookmark

onkeypress – can someone shed some light on this please

Hi,

I have checked a page for WAI accessibitly and where there is a Javascript onclick print() the report says use onkeypress.

I have looked this up on the internet and there is some information about keycodes but not much else.

Can someone tell me how this is used? If a keypress was used for printing the page wouldnt there have to be some type of listener involved? Would the onkeypress event still then need to be used and if it wasnt would it still be accessible?

thanks,

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @damon2003 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...