summaryrefslogtreecommitdiff
path: root/src/user/knob/user.c
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2020-09-19 14:53:29 -0400
committerBenji Dial <benji6283@gmail.com>2020-09-19 14:53:29 -0400
commitde20d7430df08731d9108acb83e1234ba7f1fe16 (patch)
tree8646f3d1bae3d30391df34766e3e58c0c2af8aab /src/user/knob/user.c
parent20853582d5385d12421433d21910e783caa00764 (diff)
downloadportland-os-de20d7430df08731d9108acb83e1234ba7f1fe16.tar.gz
file manager
Diffstat (limited to 'src/user/knob/user.c')
-rw-r--r--src/user/knob/user.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/user/knob/user.c b/src/user/knob/user.c
index b642f79..dfcb791 100644
--- a/src/user/knob/user.c
+++ b/src/user/knob/user.c
@@ -116,10 +116,8 @@ static const uint8_t shifted[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
-static char get_key_char() {
- _key_code_t key;
- while (!(key = _get_key()))
- _yield_task();
+__attribute__ ((const))
+char key_to_char(_key_code_t key) {
return
key & _KEY_CAPS
? key & _KEY_SHIFT
@@ -130,6 +128,13 @@ static char get_key_char() {
: key & 0xff;
}
+static char get_key_char() {
+ _key_code_t key;
+ while (!(key = _get_key()))
+ _yield_task();
+ return key_to_char(key);
+}
+
void tell_user_sz(const char *sz) {
_log_string(sz);
}