Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Stable versions
---------------

4.3.1 (?):
- Fixed arrow keys not working on windows, dos or os2
- Use nanosleep() as the delay procedure on unices if available.
- Fixed Amiga version of the delay procedure.

Expand Down
12 changes: 12 additions & 0 deletions src/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ static int read_key(void)
#if defined(_WIN32) || defined(__OS2__) || defined(__EMX__) || defined(__DJGPP__) || defined(_DOS)
if (kbhit()) {
key = getch();
if (!key || (unsigned char)key == 0xe0)
key = getch();
ret = 1;
}
#elif defined(XMP_AMIGA)
Expand Down Expand Up @@ -152,6 +154,16 @@ void read_command(xmp_context handle, const struct xmp_module_info *mi, struct c
return;

switch (cmd) {
#if defined(_WIN32) || defined(__MSDOS__) || defined(_DOS) || defined(__OS2__) || defined(__EMX__)
case 0x48:
goto cmd_next_mod;
case 0x50:
goto cmd_prev_mod;
case 0x4d:
goto cmd_next_pos;
case 0x4b:
goto cmd_prev_pos;
#endif
case 0x1b: /* escape */
cmd = read_key();
if (cmd != '[')
Expand Down
Loading