Improve redefining keys in 1998/banks

The Makefile now has variables so one can do something like:

    make clobber IT=key DT=key ... all

The alt code has hard coded alternatives to page up and page down keys.
The reason it's hard coded is it would necessarily overcomplicate the
build process, requiring different macro names for alt and original
code, and since you can redefine them all in the original entry this is
not a problem. It is merely a convenience for those who are fine with
defaults. The replacement keys are both on the left side as it would be
harder to have to use left and right when trying to use the right side
for other keys (at least on a QWERTY keyboard?).

I tried to clean up the build instructions in the README.md file for
this too but this was a bit complicated to do. It might need a bit more
work.
This commit is contained in:
Cody Boone Ferguson committed 2023-12-07 08:08:03 -08:00
1 parent dd98bfe5ce
commit 75839e221c
2 files changed
+90 -58

No files matched your search

+14 -5
View File
@@ -57,11 +57,21 @@ CSTD= -std=gnu90
#
ARCH=
# variables that control the control keys
IT= XK_Page_Up
DT= XK_Page_Down
UP= XK_Up
DN= XK_Down
LT= XK_Left
RT= XK_Right
CS= XK_Return
dt= 0.02
# Defines that are needed to compile
#
CDEFINE= -DIT=XK_Page_Up -DDT=XK_Page_Down \
-DUP=XK_Up -DDN=XK_Down -DLT=XK_Left -DRT=XK_Right \
-DCS=XK_Return -Ddt=0.02
CDEFINE= -DIT=${IT} -DDT=${DT} \
-DUP=${UP} -DDN=${DN} -DLT=${LT} -DRT=${RT} \
-DCS=${CS} -Ddt=${dt}
# Include files that are needed to compile
#
@@ -142,8 +152,7 @@ alt: data ${ALT_TARGET}
@${TRUE}
${PROG}.alt: ${PROG}.c
${CC} ${CFLAGS} -UIT -UDT -DIT=XK_f -DDT=XK_d -DUP=XK_Up -DDN=XK_Down -DLT=XK_Left -DRT=XK_Right \
-DCS=XK_Return -Ddt=0.02 $< -o $@ ${LDFLAGS}
${CC} ${CFLAGS} -UIT -UDT -DIT=XK_f -DDT=XK_d $< -o $@ ${LDFLAGS}
# data files