First post, by kin
Anyone know a TSR that allows you to remap specific keys?
For example a,w,s,d > arrow left, arrow up, arrow down, arrow right.
Only thing I found was using ansi.sys, but I'm not sure if a dos application will overrule that.
Also, I found some flat assembly code, but I'm not quite a programmer... and uh you need to compile that to 16-bit .exe?:
; Modified Keyboard Entry - 13/10/2009ORG 256mov ax,csmov ss,axmov sp,MyStack+64*2mov ds,axmov es,ax; Some arbitrary modificationmov byte [Table+"a"],"z"mov byte [Table+"z"],"a"; Save existing Keyboard Interrupt Vectorpush esmov ax,3509hint 21h ;DOS 'Get Interrupt Vector'mov [Old_09h],bxmov [Old_09h+2],espop es; Setup new Keyboard Interrupt Vectormov dx,New_09hmov ax,2509hint 21h ;DOS 'Set Interrupt Vector'; Prompt user actionmov dx,Msg1mov ah,09hint 21h ;DOS 'Display String'MainLoop:mov ah,01hint 21h ;DOS 'Keyboard Input & Echo'cmp al,27 ;<ESC> ?jne MainLoop; Restore old Keyboard Interrupt Vectorpush dslds dx,[Old_09h]mov ax,2509hint 21h ;DOS 'Set Interrupt Vector'pop ds; Terminatemov dx,Msg2mov ah,09hint 21h ;DOS 'Display String'mov ax,4C00hint 21h ;DOS 'Terminate/ReturnCode'; ----------------------------------------------New_09h:push ax bx si dsmov ax,40h ;BIOS_DataSegmentmov ds,axmov si,[001Ch] ;BIOS_KeyboardBufferTailPointer; Let BIOS take care of the hardwarepushfcall far dword [cs:Old_09h]cmp si,[001Ch] ;BIOS_KeyboardBufferTailPointerje .t1 ;No new key in buffermov al,[si] ;ASCII (SCAN in [si+1])mov bx,Tablexlat [cs:bx]mov [si],al ;Updated ASCII.t1:pop ds si bx axiret
; ----------------------------------------------ALIGN 4Old_09h:dd 0Table:times 256 db %-1MyStack:dw 64 dup (0)Msg1:db 'Watch <a> and <z> being swapped...',13,10db 'Please press some keys. <ESC> exits!',13,10,'$'Msg2:db "-- That's all folks",13,10,'$'; -----------------------------------------------