how to trigger caps lock from code in gnu-forth ? currently as a temporary solution I use
: caps s" xdotool key Caps_Lock" system ;
I'm looking for either a full gforth code solution either a abi-code assembly solution
I also tried many solutions around external nasm code but xdotool is available, so I preferred using it.
I tried many thing around https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/386-Assembler.html#g_t386-Assembler documentation without result until now.
like
abi-code toto
0x3A .b al mov
0x02 .b ah mov
0x80 int
ret
end-code
and so on ... without results
I near solution I think I also tryied to work around asm code below
; Open /dev/port for I/O operations
mov eax, 5 ; syscall number for sys_open
mov ebx, dev_port ; pointer to the filename "/dev/port"
mov ecx, 2 ; O_RDWR mode
int 0x80 ; Call the kernel
; Enable Caps Lock by sending the scancode to the keyboard controller
mov dx, 0x60 ; Port 0x60 is the keyboard controller data port
mov al, [capslock_scancode]
out dx, al
so how to trigger ON caps-lock from the gnuforth code ?
For today's need , in fact I can just change the logic of it all from why toupper with accept
so I needed a capslock trigger but a better solution is to force convertion making a intermediary word to apply toupper over a
( addr len -- addr len )like calling toupper like
so I can use
without need to modify the capslock state neither the tty setup
therefore I am still interested in capslock trigger for future potential needs