What is the escape sequence for delete key?

screw3d

Diamond Member
Nov 6, 2001
6,906
1
76
I tried googling for it but couldn't :confused: find anything useful. This is for Java if it makes any difference..

TIA.
 

glugglug

Diamond Member
Jun 9, 2002
5,340
1
81
If you mean backspace it's ascii code 8.
On a mac it's ascii code 127, and on PCs it sends ascii 0 followed by some other char (I forget what, shouldn't be too hard to make a test app...), but that has nothing to do with how you would read the key being pressed in a Windows GUI app. (VK_DELETE constant being passed in event message).

No telling what standard Java would use for this. I wouldn't be surprised if it varies depending on what host the JVM is running on.
 

screw3d

Diamond Member
Nov 6, 2001
6,906
1
76
Originally posted by: glugglug
If you mean backspace it's ascii code 8.
On a mac it's ascii code 127, and on PCs it sends ascii 0 followed by some other char (I forget what, shouldn't be too hard to make a test app...), but that has nothing to do with how you would read the key being pressed in a Windows GUI app. (VK_DELETE constant being passed in event message).

No telling what standard Java would use for this. I wouldn't be surprised if it varies depending on what host the JVM is running on.

Wow.. I think you are going into too much detail here :)

All I want is.. something like "\n" for end-of-line, "\\" for backslash, "\b" for backspace, and I'm looking for an equivalent for delete key, not backspace. :)
 

UsandThem

Elite Member
May 4, 2000
16,068
7,380
146
in java ascii value 8 is for delete key...so i think u can use it....

It's been 15 years since this question was asked and this thread created, and if he hasn't figured it out during that long period, he might want to stop messing with Java. ;)
 

Keshav Varma

Junior Member
Dec 10, 2018
2
0
6
It's been 15 years since this question was asked and this thread created, and if he hasn't figured it out during that long period, he might want to stop messing with Java. ;)
hey u r right.....nice to hear u.....but it can help to one who is searching for the same