From 64914731503a6d66599327671bef9026b03cf812 Mon Sep 17 00:00:00 2001
From: PierrePouchet <pierre.pouchet@etu.ec-lyon.fr>
Date: Mon, 17 Mar 2025 09:58:48 +0100
Subject: [PATCH] Update main.qml

---
 Motus/main.qml | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/Motus/main.qml b/Motus/main.qml
index fc5f0de..c48ecf5 100644
--- a/Motus/main.qml
+++ b/Motus/main.qml
@@ -13,18 +13,31 @@ Window {
         width: 300
         height: 100
         color: "#b93838"
+        focus: true
+
+
+
 
         Case {
-            id: _case
+            id: case1
             x: 8
             y: 20
+            _textText: "A"
         }
 
         Case {
-            id: _case1
+            id: case2
             x: 197
             y: 20
             _textText: "B"
         }
+
+        Keys.onPressed: (event)=> {
+            if (event.key === Qt.Key_A) {
+                case1._textText = qsTr("C");  // Correcte modification
+                console.log(event.key + " /// " + event.text);
+                event.accepted = true;
+            }
+        }
     }
 }
-- 
GitLab