mirror of
https://github.com/clockworkpi/PicoCalc.git
synced 2025-12-12 10:18:54 +01:00
Add PicoMite_002.patch
keyboard mapping fixes (DEL, ALT, etc.) reference: https://forum.clockworkpi.com/t/del-key-problem-solved/17049/33?u=guu
This commit is contained in:
parent
b7cb37617a
commit
6b560b3dcc
79
Code/PicoMite/PicoMite_002.patch
Normal file
79
Code/PicoMite/PicoMite_002.patch
Normal file
@ -0,0 +1,79 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index cb09311..ef288c7 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -72,7 +72,8 @@ target_compile_options(PicoMite PRIVATE -DPICOMITE
|
||||
-DPICO_CORE1_STACK_SIZE=0x00
|
||||
-DPICO_HEAP_SIZE=0x500
|
||||
-O2
|
||||
- -Wall)
|
||||
+ -Wall
|
||||
+ -DPICOCALC)
|
||||
target_link_libraries(PicoMite
|
||||
pico_stdlib
|
||||
hardware_flash
|
||||
diff --git a/Editor.h b/Editor.h
|
||||
index b0cb113..8d055a4 100644
|
||||
--- a/Editor.h
|
||||
+++ b/Editor.h
|
||||
@@ -60,14 +60,22 @@ extern int editactive;
|
||||
#define LEFT 0x82
|
||||
#define RIGHT 0x83
|
||||
#define INSERT 0x84
|
||||
+#ifdef PICOCALC
|
||||
+#define DEL 0xd4
|
||||
+#else
|
||||
#define DEL 0x7f
|
||||
+#endif
|
||||
#define HOME 0x86
|
||||
#define END 0x87
|
||||
#define PUP 0x88
|
||||
#define PDOWN 0x89
|
||||
#define NUM_ENT ENTER
|
||||
#define SLOCK 0x8c
|
||||
+#ifdef PICOCALC
|
||||
+#define ALT 0xa1
|
||||
+#else
|
||||
#define ALT 0x8b
|
||||
+#endif
|
||||
|
||||
|
||||
// definitions related to setting the tab spacing
|
||||
diff --git a/Hardware_Includes.h b/Hardware_Includes.h
|
||||
index cafaf87..06f34b3 100644
|
||||
--- a/Hardware_Includes.h
|
||||
+++ b/Hardware_Includes.h
|
||||
@@ -261,19 +261,33 @@ extern struct tagMTRand *g_myrand;
|
||||
#define DOWN 0x81
|
||||
#define LEFT 0x82
|
||||
#define RIGHT 0x83
|
||||
+#ifdef PICOCALC
|
||||
+#define DOWNSEL 0x89
|
||||
+#else
|
||||
#define DOWNSEL 0xA1
|
||||
+#endif
|
||||
#define RIGHTSEL 0xA3
|
||||
#define INSERT 0x84
|
||||
+#ifdef PICOCALC
|
||||
+#define DEL 0xd4
|
||||
+#else
|
||||
#define DEL 0x7f
|
||||
+#endif
|
||||
#define HOME 0x86
|
||||
#define END 0x87
|
||||
#define PUP 0x88
|
||||
#define PDOWN 0x89
|
||||
#define NUM_ENT ENTER
|
||||
#define SLOCK 0x8c
|
||||
+#ifdef PICOCALC
|
||||
+#define ALT 0xa1
|
||||
+#define SHIFT_TAB 0x86
|
||||
+#define SHIFT_DEL 0x87
|
||||
+#else
|
||||
#define ALT 0x8b
|
||||
#define SHIFT_TAB 0x9F
|
||||
#define SHIFT_DEL 0xa0
|
||||
+#endif
|
||||
#define CTRLKEY(a) (a & 0x1f)
|
||||
#define DISPLAY_CLS 1
|
||||
#define REVERSE_VIDEO 3
|
||||
@ -11,6 +11,7 @@ git reset --hard 7df3396dd3a1070a5459af3a04df808389bfdef8
|
||||
|
||||
git clone https://github.com/clockworkpi/PicoCalc.git #get patch code
|
||||
git apply PicoCalc/Code/PicoMite/PicoMite.patch
|
||||
git apply PicoCalc/Code/PicoMite/PicoMite_002.patch
|
||||
|
||||
export PICO_SDK_PATH=/to/where/your/pico/sdk/is
|
||||
mkdir build
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user