{"push_id":713005609,"size":2,"distinct_size":0,"ref":"refs/heads/master","head":"9d67b9f0f90a43e822d09201291603fc0f7601b3","before":"d4fe2a00276fa14a526409ccaee740ba01a17f3e","commits":[{"sha":"49b73e46d68f96e8afc8346c5d3a0ccb38f7c634","author":{"email":"0c65ff5985da83989e6f1c7dddcde4aa06d8ed54@mathieudavid.org","name":"Mathieu David"},"message":"In js from the docs, change keyboard eventlistener to be compatible with non-english keyboard layouts. Fixes #26016 Fixes #16572","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/49b73e46d68f96e8afc8346c5d3a0ccb38f7c634"},{"sha":"9d67b9f0f90a43e822d09201291603fc0f7601b3","author":{"email":"3a2c29237f73c7cf88424b80e427b1884f346b35@rust-lang.org","name":"bors"},"message":"Auto merge of #26675 - azerupi:doc-js-keyevent, r=alexcrichton\n\nLike explained in #26016, typing `?` had no effect with non-english keyboard layouts in the docs. \r\n\r\nThis patch seems to resolve this issue, **tested with AZERTY keyboard in Google Chrome and Firefox**. I haven't tested it with more exotic keyboard layouts or with other browsers though.\r\n\r\nThis code is based on the information found on: http://javascript.info/tutorial/keyboard-events\r\n\r\n**More specifically:**\r\n\r\n> The only event which reliably provides the character is keypress.\r\n\r\n**And**\r\n\r\n>```\r\n// event.type must be keypress\r\nfunction getChar(event) {\r\n  if (event.which == null) {\r\n    return String.fromCharCode(event.keyCode) // IE\r\n  } else if (event.which!=0 && event.charCode!=0) {\r\n    return String.fromCharCode(event.which)   // the rest\r\n  } else {\r\n    return null // special key\r\n  }\r\n}\r\n```\r\n\r\n`?` and `S` work, `escape` however does not (on an Azerty keyboard). \r\n\r\nIt would be good if some people could test it with other browsers and keyboard layouts: http://www.mathieudavid.org/test/rustdoc/std/index.html\r\n\r\n**Edit:**\r\n- swedish layout works on Firefox and Chromium\r\n- french (azerty) mac layout works on Safari","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/9d67b9f0f90a43e822d09201291603fc0f7601b3"}]}