mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-21 23:57:58 +01:00
Keyboard shortcuts without conflicts (hopefully)
This commit is contained in:
parent
fc11d1eff0
commit
6b6af74e14
@ -475,7 +475,7 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
|
||||
left: 0;
|
||||
background-color: var(--background-fill-secondary);
|
||||
z-index: 10000;
|
||||
min-width: 300px;
|
||||
min-width: 330px;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
|
10
js/main.js
10
js/main.js
@ -63,14 +63,14 @@ document.addEventListener("keydown", function(event) {
|
||||
document.getElementById('Regenerate').click();
|
||||
}
|
||||
|
||||
// Continue on Ctrl + Right
|
||||
else if (event.ctrlKey && event.key === 'ArrowRight') {
|
||||
// Continue on Ctrl + Shift + C
|
||||
else if (event.ctrlKey && event.shiftKey && event.key === 'C') {
|
||||
event.preventDefault();
|
||||
document.getElementById('Continue').click();
|
||||
}
|
||||
|
||||
// Remove last on Ctrl + Up
|
||||
else if (event.ctrlKey && event.key === 'ArrowUp') {
|
||||
// Remove last on Ctrl + Shift + Backspace
|
||||
else if (event.ctrlKey && event.shiftKey && event.key === 'Backspace') {
|
||||
event.preventDefault();
|
||||
document.getElementById('Remove-last').click();
|
||||
}
|
||||
@ -87,7 +87,7 @@ document.addEventListener("keydown", function(event) {
|
||||
document.getElementById('Replace-last').click();
|
||||
}
|
||||
|
||||
// Impersonate last on Ctrl + Shift + M
|
||||
// Impersonate on Ctrl + Shift + M
|
||||
else if (event.ctrlKey && event.shiftKey && event.key === 'M') {
|
||||
event.preventDefault();
|
||||
document.getElementById('Impersonate').click();
|
||||
|
@ -39,8 +39,8 @@ def create_ui():
|
||||
|
||||
# Hover menu buttons
|
||||
shared.gradio['Regenerate'] = gr.Button('Regenerate (Ctrl + Enter)', elem_id='Regenerate')
|
||||
shared.gradio['Continue'] = gr.Button('Continue (Ctrl + Right)', elem_id='Continue')
|
||||
shared.gradio['Remove last'] = gr.Button('Remove last reply (Ctrl + Up)', elem_id='Remove-last')
|
||||
shared.gradio['Continue'] = gr.Button('Continue (Ctrl + Shift + C)', elem_id='Continue')
|
||||
shared.gradio['Remove last'] = gr.Button('Remove last reply (Ctrl + Shift + Backspace)', elem_id='Remove-last')
|
||||
shared.gradio['Replace last reply'] = gr.Button('Replace last reply (Ctrl + Shift + L)', elem_id='Replace-last')
|
||||
shared.gradio['Copy last reply'] = gr.Button('Copy last reply (Ctrl + Shift + K)', elem_id='Copy-last')
|
||||
shared.gradio['Impersonate'] = gr.Button('Impersonate (Ctrl + Shift + M)', elem_id='Impersonate')
|
||||
|
Loading…
Reference in New Issue
Block a user