Fixed an issue where the PSQL terminal displays keyname for non alphanumeric keys. #8437
parent
7a25da9b06
commit
5ee33cf162
|
@ -20,6 +20,8 @@ Bundled PostgreSQL Utilities
|
|||
New features
|
||||
************
|
||||
|
||||
| `Issue #4194 <https://github.com/pgadmin-org/pgadmin4/issues/4194>`_ - Added support to automatically open a file after it is downloaded in the desktop mode.
|
||||
| `Issue #5871 <https://github.com/pgadmin-org/pgadmin4/issues/5871>`_ - Add support for restoring plain SQL database dumps.
|
||||
| `Issue #8034 <https://github.com/pgadmin-org/pgadmin4/issues/8034>`_ - Added support for creating Directory nodes in EPAS.
|
||||
|
||||
Housekeeping
|
||||
|
@ -29,4 +31,5 @@ Housekeeping
|
|||
Bug fixes
|
||||
*********
|
||||
|
||||
| `Issue #8437 <https://github.com/pgadmin-org/pgadmin4/issues/8437>`_ - Fixed an issue where the PSQL terminal displays keyname for non alphanumeric keys.
|
||||
| `Issue #8479 <https://github.com/pgadmin-org/pgadmin4/issues/8479>`_ - Fixed an issue where the Schema Diff was not displaying the difference query when a table had a UNIQUE NULLS NOT DISTINCT constraint.
|
|
@ -111,20 +111,10 @@ function psql_terminal_io(term, socket, platform, pgAdmin) {
|
|||
});
|
||||
|
||||
term.onKey(function (ev) {
|
||||
socket.emit('socket_input', checkInputKey(ev));
|
||||
socket.emit('socket_input', {'input': ev.key, 'key_name': ev.domEvent.code});
|
||||
});
|
||||
}
|
||||
|
||||
/* This function will check input key from the mentioned excludedKeys and if those
|
||||
keys are pressed, it will return event's key else it will return event's domEvent key */
|
||||
function checkInputKey(ev){
|
||||
const excludedKeys = ['Enter', 'Escape', 'Tab', 'Backspace', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];
|
||||
if(excludedKeys.includes(ev.domEvent.key)) {
|
||||
return {'input': ev.key, 'key_name': ev.domEvent.code};
|
||||
}
|
||||
return {'input': ev.domEvent.key, 'key_name': ev.domEvent.code};
|
||||
}
|
||||
|
||||
function psql_Addon(term) {
|
||||
const fitAddon = new FitAddon();
|
||||
term.loadAddon(fitAddon);
|
||||
|
|
Loading…
Reference in New Issue