Questions tagged [backspace]

The backspace key on the keyboard (deletes the previous character)

354 questions
210
votes
4 answers

jQuery: keyPress Backspace won't fire?

I wonder what I'm doing wrong: $(".s").keypress(function(e) { switch (e.keyCode) { case 8: // Backspace //console.log('backspace'); case 9: // Tab case 13: // Enter case 37: // Left case 38: // Up case…
matt
  • 42,713
  • 103
  • 264
  • 397
144
votes
28 answers

Detect backspace in empty UITextField

Is there any way to detect when the Backspace/Delete key is pressed in the iPhone keyboard on a UITextField that is empty? I want to know when Backspace is pressed only if the UITextField is empty. Based on the suggestion from @Alex Reynolds in a…
marcc
  • 12,295
  • 7
  • 49
  • 59
125
votes
5 answers

The "backspace" escape character '\b': unexpected behavior?

So I'm finally reading through K&R, and I learned something within the first few pages, that there is a backspace escape character, \b. So I go to test it out, and there is some very odd behavior: #include main () { printf("hello…
OregonTrail
  • 8,594
  • 7
  • 43
  • 58
108
votes
7 answers

UITextField - capture return button event

How can I detect when a user pressed "return" keyboard button while editing UITextField? I need to do this in order to dismiss keyboard when user pressed the "return" button. Thanks.
Ilya Suzdalnitski
  • 52,598
  • 51
  • 134
  • 168
84
votes
5 answers

How to get backspace \b to work in Eclipse's console?

I'm creating a little Java application which should have a progress indicator with percentages. In every loop it uses backspace \b to remove the displayed progress before displaying the next percentage. Here's a simplified example: public static…
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
73
votes
16 answers

vim backspace leaves ^?

In Vim, when I hit the backspace key in the insert mode, it leaves ^? character and does not delete the character it is suppose to delete. I have the following in my .vimrc syntax on set number set expandtab set incsearch set nocompatible set…
Sangeeth Saravanaraj
  • 16,027
  • 21
  • 69
  • 98
43
votes
2 answers

Backspace doesn't work in gvim 7.2 64-bit for Windows?

I just installed the 64-bit zipped version for Windows of gvim on my new machine at work, and I changed some settings to make it compatible with Visual Studio 2010. Now the backspace key doesn't work for some reason. Here's my .vimrc file: set…
leeand00
  • 25,510
  • 39
  • 140
  • 297
28
votes
3 answers

Javascript: How to remove the last character from a div or a string?

I have a div with a string of content in it. The content is not stored in a variable and I would like to remove the last character of the text in this div. Any help please? More info: I have a text field, and upon entering text into the text field,…
xa.
  • 335
  • 2
  • 5
  • 13
24
votes
5 answers

how to check for the "backspace" character in C

I'd like to know how to check if a user types the "backspace" character. I'm using the getch() function i.e. "key = getch()" in my C program and i'd like to check when backspace is pressed. the line: if(key = '\b') { .... doesn't work.
joel
  • 243
  • 1
  • 2
  • 4
23
votes
4 answers

How can I fix my delete key in VIM over ssh? (Mac OS X)

When I use VIM in the terminal on my local machine (Mac OS X Snow Leopard), the delete key is really backspace (i.e., destructive backspace). When I SSH into a particular server, for some reason it's regular delete (i.e., delete the character under…
Aeonaut
  • 1,267
  • 3
  • 14
  • 18
22
votes
5 answers

How to make a button that shows the backspace (⌫) character on Android?

I'm trying to use the ⌫ character as my backspace symbol in my android app. When I just copy and paste this character as the text value of my Button it works and shows the symbol in the simulator, but when I try to set this character dynamically in…
9patchcoder
  • 619
  • 1
  • 5
  • 17
21
votes
8 answers

Selenium-IDE: How to simulate non-printable keys (ENTER, ESC, Backspace)?

What is the exact HTML code to simulate ENTER, ESC, BACKSPACE and DOWN in Selenium IDE 1.3.0? typeKeys didn't work nor did this: keyDown id=zc_0_4_3-real 10 keyUp …
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
20
votes
4 answers

Configure eclipse so that backspace unindents

Having eclipse configured to use space instead of tabs, is it possible to configure eclipse so that the backspace key unindents like the tab key indents? A demonstration to clarify what I mean with backspace unindent (the vertical bar stands for…
Lesmana
  • 25,663
  • 9
  • 82
  • 87
18
votes
3 answers

Backspace is not deleting selection but extending it to the left (IntelliJ on Linux)

I started using IntelliJ IDEA 14.01 on CentOS 6.2 (on a VirtualBox VM on a Windows 7 machine). While selecting code, the [backspace] key is not deleting the selected text. Instead [backspace] extends the highlighted (selected) area to the left…
Ironori
  • 570
  • 2
  • 6
  • 19
16
votes
3 answers

How to trigger backspace on a textfield?

Say I have this: How would i trigger backspace on that textarea possibly using trigger() and key codes. The code for backspace is 8. And i am not looking for this: $('#myarea').val(…
odle
  • 5,172
  • 8
  • 29
  • 33
1
2 3
23 24