diff --git a/4chan_x.user.js b/4chan_x.user.js index a3f99e9ee..e884983f4 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -876,6 +876,14 @@ } } else if ((48 <= kc && kc <= 57)) { key = String.fromCharCode(kc); + } else if (kc === 37) { + key = 'Left'; + } else if (kc === 38) { + key = 'Up'; + } else if (kc === 39) { + key = 'Right'; + } else if (kc === 40) { + key = 'Down'; } else if (kc === 27) { key = 'Esc'; } else if (kc === 8) { diff --git a/changelog b/changelog index 95095e226..541894964 100644 --- a/changelog +++ b/changelog @@ -1,6 +1,7 @@ master - mayhem quote inlining default styling (by xat) + add up/down/right/left keybinding support 2.19.2 - mayhem diff --git a/script.coffee b/script.coffee index 28a836d9c..dcb10ebbb 100644 --- a/script.coffee +++ b/script.coffee @@ -626,6 +626,14 @@ keybinds = key = key.toLowerCase() else if 48 <= kc <= 57 #0-9 key = String.fromCharCode kc + else if kc is 37 + key = 'Left' + else if kc is 38 + key = 'Up' + else if kc is 39 + key = 'Right' + else if kc is 40 + key = 'Down' else if kc is 27 key = 'Esc' else if kc is 8