Fixed Macro Keyboard Layout Issues.
This commit is contained in:
parent
7d0fc6c98b
commit
54dc4dccaf
@ -175,46 +175,72 @@ label {
|
|||||||
/* REACT-SIMPLE-KEYBOARD */
|
/* REACT-SIMPLE-KEYBOARD */
|
||||||
/* ======================================= */
|
/* ======================================= */
|
||||||
|
|
||||||
/* keyboard-dark-theme.css */
|
/* Make the keyboard max width like the demo */
|
||||||
|
.simple-keyboard {
|
||||||
/* react-simple-keyboard dark theming */
|
max-width: 950px;
|
||||||
.hg-theme-dark {
|
margin: 0 auto;
|
||||||
background-color: #1e1e1e;
|
background: #181c23;
|
||||||
border: 1px solid #444;
|
border-radius: 8px;
|
||||||
|
padding: 24px 24px 30px 24px;
|
||||||
|
box-shadow: 0 2px 24px 0 #000a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hg-button {
|
/* Set dark background and color for the keyboard and its keys */
|
||||||
background: #2c2c2c;
|
.simple-keyboard .hg-button {
|
||||||
color: #ccc;
|
background: #23262e;
|
||||||
border: 1px solid #444;
|
color: #b0d0ff;
|
||||||
font-size: 11px;
|
border: 1px solid #333;
|
||||||
|
font-size: 1.1em;
|
||||||
|
min-width: 48px;
|
||||||
|
min-height: 48px;
|
||||||
|
margin: 5px;
|
||||||
|
border-radius: 6px;
|
||||||
|
transition: background 0.1s, color 0.1s;
|
||||||
|
padding-top: 6px;
|
||||||
|
padding-left: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hg-button:hover {
|
.simple-keyboard .hg-button[data-skbtn="space"] {
|
||||||
background: #58a6ff;
|
min-width: 380px;
|
||||||
color: #000;
|
|
||||||
border-color: #58a6ff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.borealis-keyboard .hg-button.hg-standardBtn {
|
.simple-keyboard .hg-button[data-skbtn="tab"],
|
||||||
border-radius: 3px;
|
.simple-keyboard .hg-button[data-skbtn="caps"],
|
||||||
|
.simple-keyboard .hg-button[data-skbtn="shift"],
|
||||||
|
.simple-keyboard .hg-button[data-skbtn="enter"],
|
||||||
|
.simple-keyboard .hg-button[data-skbtn="bksp"] {
|
||||||
|
min-width: 82px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Force rows to appear horizontally */
|
.simple-keyboard .hg-button:hover {
|
||||||
.simple-keyboard-main .hg-row {
|
background: #58a6ff;
|
||||||
display: flex !important;
|
color: #000;
|
||||||
flex-flow: row wrap;
|
border-color: #58a6ff;
|
||||||
justify-content: center;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Slight spacing around each key (optional) */
|
/* Make sure rows aren't squashed */
|
||||||
.simple-keyboard-main .hg-row .hg-button {
|
.simple-keyboard .hg-row {
|
||||||
margin: 3px !important;
|
display: flex !important;
|
||||||
}
|
flex-flow: row wrap;
|
||||||
|
justify-content: center;
|
||||||
/* Keep the entire keyboard from shrinking or going vertical */
|
margin-bottom: 10px;
|
||||||
.simple-keyboard-main {
|
}
|
||||||
display: inline-block !important;
|
|
||||||
width: auto !important;
|
/* Remove any unwanted shrink/stretch */
|
||||||
max-width: 1000px; /* or whatever max width you like */
|
.simple-keyboard .hg-button {
|
||||||
}
|
flex: 0 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Optional: on-screen keyboard input field (if you ever show it) */
|
||||||
|
input[type="text"].simple-keyboard-input {
|
||||||
|
width: 100%;
|
||||||
|
height: 48px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
font-size: 20px;
|
||||||
|
border: none;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: #181818;
|
||||||
|
color: #f5f7fa;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
////////// PROJECT FILE SEPARATION LINE ////////// CODE AFTER THIS LINE ARE FROM: <ProjectRoot>/Data/WebUI/src/nodes/Agent Roles/Node_Agent_Role_Macro.jsx
|
////////// PROJECT FILE SEPARATION LINE ////////// CODE AFTER THIS LINE ARE FROM: <ProjectRoot>/Data/WebUI/src/nodes/Automation/Node_Macro.jsx
|
||||||
import React, { useState, useEffect, useRef } from "react";
|
import React, { useState, useEffect, useRef } from "react";
|
||||||
import { Handle, Position, useReactFlow, useStore } from "reactflow";
|
import { Handle, Position, useReactFlow, useStore } from "reactflow";
|
||||||
import Keyboard from "react-simple-keyboard";
|
import Keyboard from "react-simple-keyboard";
|
||||||
@ -410,12 +410,11 @@ const MacroKeyPressNode = ({ id, data }) => {
|
|||||||
textAlign: "center"
|
textAlign: "center"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Full Keyboard
|
Click on the Desired Key
|
||||||
</div>
|
</div>
|
||||||
<Keyboard
|
<Keyboard
|
||||||
onKeyPress={onKeyPress}
|
onKeyPress={onKeyPress}
|
||||||
layoutName={layoutName}
|
layoutName={layoutName}
|
||||||
theme="hg-theme-dark hg-layout-default"
|
|
||||||
layout={{
|
layout={{
|
||||||
default: [
|
default: [
|
||||||
"{escape} {f1} {f2} {f3} {f4} {f5} {f6} {f7} {f8} {f9} {f10} {f11} {f12}",
|
"{escape} {f1} {f2} {f3} {f4} {f5} {f6} {f7} {f8} {f9} {f10} {f11} {f12}",
|
||||||
@ -436,7 +435,7 @@ const MacroKeyPressNode = ({ id, data }) => {
|
|||||||
}}
|
}}
|
||||||
display={{
|
display={{
|
||||||
"{bksp}": "⌫",
|
"{bksp}": "⌫",
|
||||||
"{escape}": "esc",
|
"{escape}": "ESC",
|
||||||
"{tab}": "tab",
|
"{tab}": "tab",
|
||||||
"{lock}": "caps",
|
"{lock}": "caps",
|
||||||
"{enter}": "enter",
|
"{enter}": "enter",
|
||||||
@ -455,6 +454,7 @@ const MacroKeyPressNode = ({ id, data }) => {
|
|||||||
"{f11}": "F11",
|
"{f11}": "F11",
|
||||||
"{f12}": "F12"
|
"{f12}": "F12"
|
||||||
}}
|
}}
|
||||||
|
theme="simple-keyboard"
|
||||||
/>
|
/>
|
||||||
<div style={{ display: "flex", justifyContent: "center", marginTop: "8px" }}>
|
<div style={{ display: "flex", justifyContent: "center", marginTop: "8px" }}>
|
||||||
<button onClick={() => setShowKeyboard(false)} style={buttonStyle}>
|
<button onClick={() => setShowKeyboard(false)} style={buttonStyle}>
|
||||||
@ -508,7 +508,7 @@ const keyboardContainer = {
|
|||||||
borderRadius: "6px",
|
borderRadius: "6px",
|
||||||
border: "1px solid #444",
|
border: "1px solid #444",
|
||||||
zIndex: 1001,
|
zIndex: 1001,
|
||||||
maxWidth: "650px"
|
maxWidth: "950px"
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user