Whitelist pageup and down keys in xterm
We currently block all keys in xterm so we can use ctrl+c for copying text. However this blocks scrolling via shift+pageup and down. Whitelist those buttons so scrolling per keyboard works. This blocks scrolling per keyboard. In case this is still needed we should add it back with a specific blacklist or whitelist. Change-Id: Ida8c90f556912941af528d3c1fd322cf1256185d
This commit is contained in:
parent
4af8c52a2e
commit
35d56eeb68
|
@ -99,7 +99,11 @@ class StreamPage extends React.Component {
|
|||
term.setOption('disableStdin', true)
|
||||
term.setOption('convertEol', true)
|
||||
|
||||
term.attachCustomKeyEventHandler(function () {return false})
|
||||
// Block all keys but page up/down. This needs to be done so ctrl+c can
|
||||
// be used to copy text from the terminal.
|
||||
term.attachCustomKeyEventHandler(function (e) {
|
||||
return e.key === 'PageDown' || e.key === 'PageUp'
|
||||
})
|
||||
|
||||
term.open(this.terminal)
|
||||
|
||||
|
|
Loading…
Reference in New Issue