Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -556,22 +556,22 @@ with gr.Blocks(css=css) as demo:
|
|
556 |
this.value = \"\";
|
557 |
}
|
558 |
}
|
559 |
-
'
|
560 |
-
|
561 |
-
|
562 |
-
A S D F G H J K L ; '
|
563 |
-
Z X C V B N M , . /
|
564 |
-
move rotate scale
|
565 |
-
</pre><script>
|
566 |
-
alert(\"hi\");
|
567 |
-
document.getElementById(\"keymap\").innerHTML = document.getElementById(\"keymap\").innerText.replace(/\s[weasdzx]\s/gi, function(c){
|
568 |
return \"<b style="color:red">\" + c.toUpperCase() + \"</b>\";
|
569 |
}).replace(/\s[tyfghvb]\s/gi, function(c){
|
570 |
return \"<b style="color:green">\" + c.toUpperCase() + \"</b>\";
|
571 |
}).replace(/\s[iojklm,]\s/gi, function(c){
|
572 |
return \"<b style="color:blue">\" + c.toUpperCase() + \"</b>\";
|
573 |
});
|
574 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
575 |
selected = gr.Number(elem_id="fnum", value=0, minimum=0, maximum=256, interactive=False)
|
576 |
output_frame.select(fn=select_frame, inputs=None, outputs=[output_depth, selected], show_progress='hidden')
|
577 |
output_depth.select(fn=select_frame, inputs=None, outputs=[output_frame, selected], show_progress='hidden')
|
|
|
556 |
this.value = \"\";
|
557 |
}
|
558 |
}
|
559 |
+
' onfocus='if (document.getElementById(\"keymap\").style.color != \"white\") {
|
560 |
+
document.getElementById(\"keymap\").style.color = \"white\";
|
561 |
+
document.getElementById(\"keymap\").innerHTML = document.getElementById(\"keymap\").innerHTML.replace(/\s[weasdzx]\s/gi, function(c){
|
|
|
|
|
|
|
|
|
|
|
|
|
562 |
return \"<b style="color:red">\" + c.toUpperCase() + \"</b>\";
|
563 |
}).replace(/\s[tyfghvb]\s/gi, function(c){
|
564 |
return \"<b style="color:green">\" + c.toUpperCase() + \"</b>\";
|
565 |
}).replace(/\s[iojklm,]\s/gi, function(c){
|
566 |
return \"<b style="color:blue">\" + c.toUpperCase() + \"</b>\";
|
567 |
});
|
568 |
+
}'/><pre id='keymap'>
|
569 |
+
` 1 2 3 4 5 6 7 8 9 0 - =
|
570 |
+
Q W E R T Y U I O P { }
|
571 |
+
A S D F G H J K L ; '
|
572 |
+
Z X C V B N M , . /
|
573 |
+
move rotate scale
|
574 |
+
</pre>""")
|
575 |
selected = gr.Number(elem_id="fnum", value=0, minimum=0, maximum=256, interactive=False)
|
576 |
output_frame.select(fn=select_frame, inputs=None, outputs=[output_depth, selected], show_progress='hidden')
|
577 |
output_depth.select(fn=select_frame, inputs=None, outputs=[output_frame, selected], show_progress='hidden')
|