Closed Fr-Dae closed 2 weeks ago
Nope, only QWERTY keyboard layout is showed in the assignment menu. But I find it just a minor inconvenience
"minor" qwerty keyboard have less key usable than azerty :/
why close the issue if it's not resolve ?
it's complicate to use DIK Code
for auto assign layout ( azerty -fr azerty be, DE, and all other keyboard)
@pktiuk
hypotetique idea for use DIK code with QTKeyEvents
#include <QtCore/QCoreApplication>
#include <QtCore/QTimer>
#include <QtCore/QObject>
#include <QDebug>
#include <QKeyEvent>
#include <QWidget>
class KeyEventHandler : public QObject {
Q_OBJECT
public:
explicit KeyEventHandler(QObject* parent = nullptr)
: QObject(parent) {}
signals:
void keyPressed(int key); // Signal émis lorsque une touche est pressée
public slots:
void handleKeyEvent(QKeyEvent* event) {
if (event->type() == QEvent::KeyPress) {
emit keyPressed(event->key()); // Émettre le signal avec le code de la touche pressée
}
}
};
class MainWindow : public QWidget {
Q_OBJECT
public:
MainWindow(QWidget* parent = nullptr)
: QWidget(parent), keyEventHandler(new KeyEventHandler(this)) {
// Connecter le signal keyPressed à un slot dans MainWindow
connect(keyEventHandler, &KeyEventHandler::keyPressed, this, &MainWindow::onKeyPressed);
// Connecter l'événement clavier à la méthode handleKeyEvent
installEventFilter(keyEventHandler);
}
~MainWindow() {
delete keyEventHandler;
}
private slots:
void onKeyPressed(int key) {
// Traiter la touche pressée en fonction de son code
qDebug() << "Touche pressée, code:" << key;
// Exemple de traitement des touches
switch (key) {
case Qt::Key_A:
qDebug() << "La touche A a été pressée";
break;
case Qt::Key_B:
qDebug() << "La touche B a été pressée";
break;
default:
qDebug() << "Autre touche pressée: " << key;
break;
}
}
protected:
bool event(QEvent* event) override {
// Passer l'événement au filtre d'événements
return QWidget::event(event);
}
private:
KeyEventHandler* keyEventHandler;
};
int main(int argc, char *argv[]) {
QCoreApplication a(argc, argv);
MainWindow window;
window.show();
return a.exec();
}
#include "main.moc"
"minor" qwerty keyboard have less key usable than azerty :/
Then you can tell which buttons are missing and they can be placed in the list on the right side of assignment window.
Is there an existing issue for this?
Current Behavior
antimicrox 3.5.0 windows 10
at top, antimicro at bottom, my keyboard.
Expected Behavior
No response
Steps To Reproduce
No response
Environment
Anything else?
No response
Upvote & Fund