Word code for return

I am writing a technical document in MS Word 2007, which needs to show the reader how to execute some commands on the operating system. Something like:

C:script_dir> run.bat [RETURN]

Many technical books show a symbol for the [RETURN], which is what I would like to do — not only to cut down on the length of the text, but also to eliminate any confusion about whether the reader should include that space between the «run.bat» and the [RETURN] key.

I looked through the stuff that’s available through «Insert Symbol», but didn’t see anything that looked like a good candidate.

Any suggestions?

Mokubai's user avatar

Mokubai

87.3k25 gold badges201 silver badges226 bronze badges

asked Dec 2, 2010 at 18:10

Jeff Knecht's user avatar

i think you’re looking for the downwards arrow with corner leftwards?

  • «carriage return arrow»
  • U+21B5
  • ↵
  • Alt + 21B5

answered Dec 2, 2010 at 18:18

Ian Boyd's user avatar

Ian BoydIan Boyd

21.4k47 gold badges134 silver badges182 bronze badges

6

I would recommend getting a keycap font (one example I quickly found is Qwerty PC), especially if you’ll be representing keystrokes often throughout your documents. Make sure the font covers special keys like Enter . Some are free, and some aren’t.

If you go this route, however, consider whether you’ll need to embed the font so you can open the file on another computer.

answered Dec 2, 2010 at 18:27

Firefeather's user avatar

FirefeatherFirefeather

5932 silver badges13 bronze badges

6

I generally use <ENTER> for my technical documentation, with a space after the last command. Then in the intro of the document you can say what it represents, and that the preceding space is just for formatting and should be ignored.

answered Dec 2, 2010 at 18:14

This might need some explanation for your readers, but some use the pilcrow: ¶

answered Dec 2, 2010 at 18:35

Arjan's user avatar

ArjanArjan

30.8k14 gold badges74 silver badges112 bronze badges

Thanks I was hunting for this alt code for the return arrow character for weeks. . .

In MS Word and Wordpad, Alt 8629 appears in most fonts as a left right angle arrow but not in Excel or Windows. Thus it is similar to a carriage return and can be used for that but it is not a real carriage return symbol and depending upon the program it will behave differently.
ALT 8629 / ALT181 Box Drawings Vertical Single and Left Double

In MS 2019 Word Insert tab > Symbol, Subset Arrows, Third ros of arrows, second from the left.

answered Jan 1 at 20:42

mrgcav's user avatar

Written by Allen Wyatt (last updated April 7, 2018)
This tip applies to Word 97, 2000, 2002, and 2003


When you use a typewriter, you press the Return, or Enter, key at the end of each line. This signifies you are done with one line and ready to begin the next. In Word, however, you do not have to do this. When you set up your page margins, Word is programmed to know that when you reach the right margin your text should automatically wrap to the next line.

There may be times, however, when you want to end a line before you get to the right margin. In these instances, you can end a line in either of two ways. The first way is to press the Enter key where you want the line to end. This results in a hard return being entered in the document. This action (pressing Enter) indicates that you have reached the end of the paragraph and want to start a new one.

The other way to end a line is to press Shift+Enter; this results in a soft return, sometimes called a line break or a newline character, being entered in the document. Hard returns are used to signify the end of a paragraph, whereas soft returns simply signify the end of a line.

If you have changed your view options so you can see all nonprinting characters, then a hard return appears on your screen as a paragraph mark (a backwards P), and a soft return appears as a down-and-left pointing arrow.

WordTips is your source for cost-effective Microsoft Word training.
(Microsoft Word is the most popular word processing software in the world.)
This tip (170) applies to Microsoft Word 97, 2000, 2002, and 2003.

Author Bio

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. Learn more about Allen…

MORE FROM ALLEN

Controlling Automatic Indenting

Type a tab character and you might just find that Word adjusts the indentation of the entire paragraph. If you don’t like …

Discover More

Copying Comments to Cells

Need to copy whatever is in a comment into a cell on your worksheet? If you have lots of comments, manually doing this …

Discover More

Updating a Field in a Text Box

If you put a field into a text box, you might be surprised to find that it doesn’t update when you try to update all your …

Discover More

More WordTips (menu)

Displaying Nonprinting Characters

Nonprinting characters are a great boon when you are editing a document. Turn them on and you can easily see what …

Discover More

Getting the Proper Type of Ellipses

Type three periods in a row, and the AutoCorrect feature in Word kicks in to exchange that sequence for a special …

Discover More

Single-Character Fractions

Some fractions Word automatically converts to single characters, some it doesn’t. Here’s why that happens and what you …

Discover More

Angry word helper

Возможно, у вас есть ощущение, что тема макросов в Ворде достаточно маргинальная. Кто ими может пользоваться-то вообще? Ну, малварь делают иногда… Да и пишутся они на давно забытом VBA (Visual Basic for Applications, он же несколько урезанный Visual Basic 6 в интерпретируемом виде), фу!

Но на самом деле у многих ведь возникает потребность то какой-нибудь отчётик в ворде написать, то курсовую оформить, то резюме перед отправкой в компанию вашей мечты подправить… А у некоторых работа напрямую связана с Word. Часто различные системы документации предлагают экспорт в форматы doc или docx, которые нужны вашим заказчикам. И бывает, что документы после экспорта выглядят фигово, приходится их исправлять.

Работа в ворде нередко подразумевает выполнение каких-то однообразных повторяющихся действий, которые иногда (но далеко не всегда!) решаются грамотной настройкой стилей и их применением, а также использованием шаблонов. Как же автоматизировать всё остальное? Тут-то нам на помощь приходят те самые макросы.

Что же в них такого хорошего? Ну, например, они автоматически и достаточно быстро выполняют за вас однообразные действия. Могут что-то подсчитать, переформатировать документ, пометить аннотациями подозрительные места, — словом, всё, что запрограммируете. Могут даже в режиме реального времени что-то исправлять и о чем-то предупреждать, пока вы пишете документ. VBA в Word позволяет автоматизировать практически все действия, которые вы можете выполнить с документом вручную.

Макросы можно прикрепить как к конкретному документу (в чём для нас мало пользы, а для писателей троянов это единственная опция), так и к самому ворду, что позволяет применять макросы к любому документу, с которым вы работаете.

Макросы работают в любой версии Word и требуют минимум правок при переносе с одной версии на другую (а чаще всего вообще не требуют). На макросах можно даже реализовать полноценный пользовательский интерфейс с формами!

Давайте же занырнём в Visual Basic и напишем что-нибудь полезное! В качестве первого примера я покажу, как сделать макрос, который заменит два и более последовательных перевода строки на единственный. Это часто требуется при исправлении документов после экспорта из систем документации, или если вы хотите удалить случайно проставленные лишние переводы строк в собственноручно написанном документе. Макрос сделаем добротный, с пользовательским интерфейсом и прогрессом выполнения операции.

Чтобы начать писать или использовать макросы, сначала требуется убедиться, что в Word’е отображается панель «Разработчик» («Developer»). Если она у вас не отображается, следует зайти после создания нового документа в меню «Файл» («File») -> «Параметры» («Options») -> «Настроить ленту» («Customize Ribbon»), после чего найти там и установить флажок «Разработчик» («Developer»).

Enable Word developer tab

После этого нужно зайти на вкладку «Разработчик» и выбрать меню «Visual Basic».

Word Visual Basic button

В открывшемся окне слева вы увидите два проекта: «Normal» и проект, относящийся к текущему открытому документу. Возможно, в проекте «Normal» у вас уже будет какой-то файл в каталоге «Modules». В любом случае, создайте новый модуль, кликнув правой кнопкой по проекту «Normal» и выбрав «Insert» -> «Module».

Word insert new module

Созданный модуль представляет из себя файл, куда мы и будем писать код макросов. Можно переименовать модуль (по умолчанию его имя будет «Module1») в окне «Properties» -> «Name». Я назову свой модуль «AllMacros». Теперь откроем код модуля, дважды кликнув по его имени, и приступим к созданию макроса. Напомню, что наша цель — заменить два и более последовательных перевода строки на единственный, произведя замены по всему документу. Очевидно, нам потребуется функция, которая осуществляет поиск по тексту, ведь мы хотим найти несколько последовательных переводов строки. В Word это эквивалентно началу нового параграфа. Вы могли бы осуществить поиск начала нового параграфа через обычное окно поиска, введя в поле поиска ^p, ^13 или ^013 (что соответствует ASCII-коду перевода строки). Функция поиска будет выглядеть так:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

Private Function FindNextText(text As String, useWildcards As Boolean)

    Selection.Find.ClearFormatting

    Selection.Find.Replacement.ClearFormatting

    With Selection.Find

        .Text = text

        .Forward = True

        .Format = False

        .MatchCase = False

        .MatchWholeWord = False

        .MatchKashida = False

        .MatchDiacritics = False

        .MatchAlefHamza = False

        .MatchControl = False

        .MatchWildcards = useWildcards

        .MatchSoundsLike = False

        .MatchAllWordForms = False

        .Wrap = wdFindStop

    End With

    Selection.Find.Execute

    FindNextText = Selection.Find.Found

End Function

Давайте разберём, что тут происходит. Мы объявляем функцию с двумя параметрами. Первый имеет тип String — это текст для поиска, а второй Boolean говорит о том, нужно ли использовать символы подстановки (wildcards). Про них я поговорю позже. В следующих двух строках 2 и 3 мы очищаем форматирование для строки поиска и строки замены, если оно было задано пользователем. Word позволяет задать форматирование строки поиска/замены, а для нашей задачи это не требуется. Далее мы задаём набор параметров для объекта Selection.Find: выставляем неинтересные нам параметры в False, параметр Text — это текст, который мы хотим найти, а параметр MatchWildcards указывает на использование символов подстановки. Параметр Wrap говорит о том, следует ли продолжать поиск, когда мы дошли до той точки, с которой поиск начали, и у нас его значение установлено в wdFindStop, так как мы хотим остановиться, когда дойдём до конца документа, и не зацикливать поиск.

Вообще, всё это обилие свойств и объектов из объектной модели Word, Excel и PowerPoint (да, там тоже есть макросы) хорошо описано в MSDN. Например, вот тут перечислены свойства и методы объекта Find. Есть русская документация (скажем, эта страница), но она выполнена совершенно кринжовым машинным переводом, невозможно читать:

Есть совершенно смехотворные страницы:

В общем, лучше читайте на английском. :D

Кроме того, все доступные объекты, их свойства и методы можно посмотреть прямо в редакторе VBA в самом Word’е. Для этого нужно нажать F2 или выбрать меню «View» -> «Object browser», что приведет к открытию браузера объектов (Object browser), в котором можно пролистать или поискать то, что вам доступно.

Word object browser

Но вернёмся к нашей функции. На строке 19 мы непосредственно выполняем поиск заданного текста с указанными параметрами. Строка 20 — эта конструкция, аналогичная return в си-подобных языках, указывает возвращаемое значение функции. Мы возвращаем булевое значение Selection.Find.Found, которое говорит о том, было ли что-то найдено.

Хочу заметить, что использование объекта Selection.Find и изменение его свойств заменит их значения и для пользователя. Например, если вы в Word искали что-то хитроумное с конкретно заданными параметрами, то выполнение макроса заменит ваши параметры поиска на те, которые мы задали в макросе. В идеале, их можно запомнить, а потом вернуть, но мы не будем так сильно заморачиваться, а просто всё за собой подчистим. Сделаем функцию, которая сбрасывает параметры в значения по умолчанию:

Private Sub ClearFindAndReplaceParameters()

    With Selection.Find

       .ClearFormatting

       .Replacement.ClearFormatting

       .Text = «»

       .Replacement.Text = «»

       .Forward = True

       .Wrap = wdFindStop

       .Format = False

       .MatchCase = False

       .MatchWholeWord = False

       .MatchWildcards = False

       .MatchSoundsLike = False

       .MatchAllWordForms = False

    End With

End Sub

Обратите внимание, что это уже Sub, а не Function, потому что мы не хотим из этой процедуры возвращать никакое значение. Это аналог функции void в си-подобных языках.

Теперь нужно определить, как нам найти два или более последовательных перевода строки. Для этого нам и потребуются упомянутые ранее wildcards. Word поддерживает символы подстановки при поиске, и по своей функциональности они напоминают регулярные выражения. Кстати, вы можете ими пользоваться и без макросов из окна расширенного поиска:

Word wildcards

Хорошее описание символов подстановки я нашел здесь, правда, на английском языке. Составим регулярное выражение для поиска двух и более последовательных переводов строки: [^013]{2,}. Это очень похоже на классическое регулярное выражение Perl или PCRE, но в квадратных скобках в уникальном стиле Word мы задаем символ перевода строки. Фигурные скобки указывают, что символов перевода подряд должно быть два или более. Тут, кстати, есть нюанс: не во всех версиях/локализациях Word такая регулярка заработает. В некоторых случаях вместо запятой потребуется указать точку с запятой (да, в Microsoft иногда делают крайне странные вещи). Чтобы сделать наш макрос более универсальным, напишем функцию, которая вернёт регулярное выражение, пригодное для поиска в той версии Word, в которой эту функцию запустили:

Private Function GetLineBreakSearchRegExp()

    On Error GoTo Err

    FindNextText «[^013]{2,}», True

    GetLineBreakSearchRegExp = «[^013]{2,}»

    Exit Function

Err:

    GetLineBreakSearchRegExp = «[^013]{2;}»

End Function

Здесь мы сначала пытаемся осуществить поиск с помощью wildcard’а [^013]{2,}. Если всё окей, то вернём из функции этот самый wildcard как рабочий (строка 4). В противном случае произойдёт ошибка, но мы готовы её обработать: мы установили обработчик всех ошибок в строке 2. Нас перекинет на метку Err, и тут мы вернём wildcard, который пригоден для других ревизий Word (в котором запятая внутри фигурных скобок заменена на точку с запятой).

Далее напишем функцию, которая будет заменять несколько последовательных переводов строки на единственный:

Private Sub RemoveNextEnters()

    Selection.MoveStart wdWord, 1

    If Selection.Range.Start <> Selection.Range.End Then Selection.Delete

End Sub

Эта функция подразумевает, что вызывать её будут тогда, когда объект Selection указывает на найденные несколько переводов строки. В строке 2 перемещаем начало выделения (а в выделены у нас будут все найденные последовательные переводы строки) на один символ вперед, а затем в строке 3, если начало выделения не совпадает с его концом, удаляем его содержимое. Таким образом, если было выделено три перевода строки, мы отступаем вперед на 1 символ (оставляя один перевод строки нетронутым), а затем удаляем оставшиеся два.

Осталось написать последнюю функцию, которая будет всем управлять.

Sub RemoveExcessiveEnters()

    Dim lineBreakSearchRegExp As String

    lineBreakSearchRegExp = GetLineBreakSearchRegExp()

    Selection.HomeKey Unit:=wdStory

    While FindNextText(lineBreakSearchRegExp, True) = True

        RemoveNextEnters

    Wend

    ClearFindAndReplaceParameters

End Sub

Здесь мы оперируем ранее написанными функциями. Сначала получаем текст регулярного выражения (wildcard’а) для поиска нескольких переводов строки подряд, затем вызовом HomeKey в строке 5 переходим в самое начало документа (перемещаем туда курсор), а затем в цикле ищем все интересующие нас места и удаляем излишние переводы строки. В конце сбрасываем параметры поиска на значения по умолчанию.

Finished word macro

Вот и всё, макрос можно запускать! Обратите внимание, что все функции, кроме последней, мы пометили Private. Мы не хотим, чтобы их вызывали напрямую. Доступной для вызова снаружи будет только функция RemoveExcessiveEnters. Перед запуском макроса стоит убедиться, что макросы включены. Если вылазит такая панель, то нужно нажать «Включить содержимое» («Enable content»):

Word enable content

Если такой панели нет, то можно зайти в меню «Файл» («File») -> «Сведения» («Info») и включить макросы уже оттуда:

Word enable content from info menu

Вы можете включить макросы на время одного сеанса Word (это по умолчанию и происходит, если нажимаете «Включить содержимое»), так что после перезапуска Word макросы снова будут отключены. Для запуска макроса возвращаемся в Word на панель «Разработчик» и нажимаем кнопку «Макросы» («Macros»), выбираем наш макрос RemoveExcessiveEnters и нажимаем «Выполнить» («Run»). Разумеется, у вас должен быть открыт какой-нибудь подопытный документ, где имеются лишние переводы строк. В качестве бонуса наш макрос ещё и удалит пустые элементы списков, потому что они представляют из себя точно такие же несколько переводов строки подряд.

Word macro: before and after

Макрос выполняется достаточно быстро. Его действие можно отменить (каждый шаг независимо), открыв меню выполненных действий:

Undo Word macro

Макросы можно отлаживать через окно VBA, в котором мы писали макрос. Кликнув слева от строки кода, можно, как и в других средах разработки, поставить точку останова, а потом запустить макрос кнопкой «Run». Запустится та функция, на которой у вас находится курсор. Если вы поставите курсор на функцию с параметрами, то появится обычный запрос на выбор макроса для запуска, как при нажатии на кнопку «Макросы» в Word.

Debug Word macros

Думаю, что материала для одной статьи уже вполне достаточно. Я, конечно, пообещал горы функционала в виде интерфейса пользователя, отслеживания прогресса выполнения, и всё это обязательно будет, но в следующей публикации.

Код макроса можно скачать тут. Вы сможете его импортировать к себе в Word, кликнув правой кнопкой на «Normal» -> «Import file…» и выбрав загруженный файл.

P.S. Кстати, рекомендую создавать бэкапы своих макросов, экспортируя их куда-нибудь на диск. Даже лицензионный Word имеет свойство их иногда по какой-то причине удалять из шаблона Normal, в котором мы их создавали.

Image of Susan Harkins

on

August 23, 2021, 9:27 AM PDT

How to use Replace to remove or add hard returns in a Word document

Too many or too few hard returns can ruin an otherwise professional looking Microsoft Word document. Fortunately, it’s easy to add and replace those hard returns using Word’s Replace feature.

Image: iStock/Sonja Rachbauer

In a Word document, you usually allow Word to wrap to the next line as you enter content. You press Enter only when you’re ready to start a new paragraph. It’s not uncommon though, especially with older documents that you inherit to find more than one hard return between paragraphs. That’s because someone used hard returns instead of altering the text style to add white space. It’s not right or wrong, but in this article, I’ll show you how to use the Replace feature to delete and add hard returns.

SEE: 83 Excel tips every user should master (TechRepublic)

I’m using Microsoft 365 on a Windows 10 64-bit system, but you can use earlier versions. Word Online doesn’t support special-character searches yet. There’s no demonstration file; you don’t need one. Enter =Rand() into a blank document to create a few paragraphs of text, as I did.

What’s a hard return?

Before we get started, I want to mention that the term hard return refers to manually pressing Enter to wrap text to the next line. Word refers to it as a paragraph mark. You’ll see the terms used interchangeably. In this article, I’ll use hard return when speaking generally and I’ll use paragraph mark when referring to the actual symbol circled in Figure A. To see this symbol, click Show/Hide in the Paragraph group on the Home tab.

As you can see in Figure A, there’s only one paragraph mark (hard return) between paragraphs. By default, newer versions of Word automatically add white space between paragraphs using a Spacing setting (more about that later). That’s how you get so much white space between paragraphs with only one hard return. You can adjust the setting, but let’s don’t. Instead, let’s remove it using Replace and see what happens.

Figure A

Deleting hard returns using Replace in Word

Now let’s suppose that you don’t want all that white space between he paragraphs, and you incorrectly assume that there are two hard returns instead of one because the paragraphs. In this case, you might do the following using Replace:

  1. On the Home tab, click Editing and then choose Replace, or click Ctrl + G. Click the Replace tab if necessary.
  2. Click More if necessary to expose more options.
  3. Click inside the Find What control.
  4. Click the Special button at the bottom of the dialog and choose Paragraph Mark from the resulting list (Figure B). Do this again, so Word looks for two paragraph marks (Figure C). The characters ^p represent a paragraph mark. It’s worth noting that you should use the Special button to enter special characters. Entering the carat character (^) manually doesn’t always work.
  5. Click inside the Replace With control.
  6. Use the Special button to enter only one Paragraph Mark (Figure C).
  7. Take a shortcut and click Replace All. Word confirms the task but makes no replacement (Figure D). (If you have one, don’t worry, it’s probably an extra hard return at the end of the text.)

Figure B

Figure C

Figure D

Are you surprised that nothing happened? By replacing two paragraph marks with only one, you might think you’re removing a paragraph mark between each paragraph, but that didn’t work because there’s only one paragraph mark. Word didn’t find two paragraph marks together.

Let’s delete just one paragraph mark and see what happens. Repeat the steps above, but in step 4, you need only one Paragraph Mark and in step 6, leave the Replace With control blank (delete the original paragraph mark from the first run if necessary). When you click Replace All, Word deletes all of the paragraph marks (a total of 5) and you end up with the single paragraph shown in Figure E.

Figure E

Before we move on to the section on adding hard returns, press Ctrl + Z to undo the Replace task and reset the text to its original space formatting.

SEE: Windows 10: Lists of vocal commands for speech recognition and dictation (free PDF) (TechRepublic)

How to add hard returns using Replace in Word

Now we already know that there’s only one hard return between each paragraph and that a space setting is creating all that white space, so let’s delete it so we can practice adding a hard return using Replace. First, let’s change that space setting as follows:

  1. Select the content (all of it).
  2. Click the More button in the Paragraph group on the Home tab.
  3. On the Indents and Spacing tab, check the Don’t Add Space Between Paragraphs of the Same Style option (Figure F).
  4. Click OK.

Figure F

The extra spacing is gone, but the single hard returns are still in place. What we need to do now is add a hard return to add more spacing. (I know it seems like we’re not actually solving anything, and we’re not; we’re simply working through examples of how to add and delete paragraph returns using Replace.)

Repeat the instructions for the replace task used above. You’re looking for one paragraph return (^p), and you want to replace it with two (^p^p). You’re reversing the first replace task. Figure G shows the results. The spacing is similar to the earlier space setting.

Figure G

I’m not suggesting that you eliminate the default spacing between paragraphs and then replace it with two hard returns using Replace. That’s not the point of the exercises. We’re deleting and adding hard returns using Replace because it’s easier than manually removing and adding them. You’ve learned that you can use Replace to add and delete them and that ^p represents a paragraph mark when searching a document.

Also See

  • How to make fewer mistakes and work more efficiently using predictive text in Microsoft 365
    (TechRepublic)

  • How to use the many text wrapping options in Microsoft Word
    (TechRepublic)

  • Microsoft 365: A cheat sheet
    (TechRepublic)

  • Zoom vs. Microsoft Teams, Google Meet, Cisco WebEx and Skype: Choosing the right video-conferencing apps for you (free PDF)
    (TechRepublic)

  • Checklist: Securing Windows 10 systems
    (TechRepublic Premium)

  • Must-read coverage: Windows 10
    (TechRepublic on Flipboard)

  • Microsoft

  • Software

I’m trying to list the what various keys do inside the documentation for my CLI program, but I’m not sure what to refer to this key as. It is commonly referred to as either Enter or Return, but which is considered better UX? I was going to list it as Enter/Return, but that seems sloppy.

A Google search seems to indicate that Enter is more prevalent. However, my laptop gives different results — while having both enter and return on it, return is printed in larger text on the key and is placed closer on the key to the user.

How should I refer to this key?

asked Mar 22, 2014 at 17:48

ananaso's user avatar

ananasoananaso

4021 gold badge4 silver badges8 bronze badges

2

To be frank, only a selected few are aware that the Enter and Return keys are not the same — whether you refer to it as Enter or Return, users will press either buttons (if they have both buttons). This is due to the fact that on very few software products the Enter and Return keys do different things (Avid’s Pro Tools is the only example I can give).

My own experience is that Enter is a more popular name; «Press the return key» sounds odd, while «Press Enter» sounds natural. I fail to see anyone to whom you’ll say «Press Enter» going «Hu?», while I can imagine this happening if you’ll say «Press Return». But that’s just me and based on my own subjective experience; perhaps in Norway they use Return more than Enter. However, as you said, a search for «Press Enter» on Google yields 15 million results, while «Press Return» yields less than a million.

If I had been you I wouldn’t worry about it so much and use Enter.


Trivia

The term Return is a shorthand for Carriage Return.

Originally, the term carriage return referred to a mechanism or lever on a typewriter. It was used after typing a line of text and caused the assembly holding the paper (the carriage) to return to the right so that the machine was ready to type again on the left-hand side of the paper.

Source: Wikipedia.

Community's user avatar

answered Mar 22, 2014 at 21:12

Izhaki's user avatar

IzhakiIzhaki

32.3k5 gold badges65 silver badges97 bronze badges

4

«Enter» is a more popular choice than «Return». According to Google ngrams.

enter image description here

As Robusto commented, you need to take into account that the phrases used in this ngrams search may appear in contexts other than that of computer keyboard usage and that this may skew the results. (members of the press enter the courtroom)

However it seems clear that Enter is a better bet than Return.

I’d therefore write «Press Enter» unless I could be certain that the users have a specific keyboard with a specific label on the key want them to use.

answered Mar 23, 2014 at 18:07

RedGrittyBrick's user avatar

2

Return and Enter are different keys. Return often found as the main key, and Enter for the numeric key.

Few software makes a difference between these. In Adobe Photoshop while editing text, Return will add a new line, and Enter will finish the editing.

Microsoft Windows on screen keyboard uses Enter to describe both keys; but they still act as their corresponding key. Looking at several photos of keyboards for Windows, they often have the main key as ↵ Enter (the ↵ symbol stands for return), and just Enter for the numeric key.

Apple Mac keyboard uses Return, with Enter written above to be accessed by the Fn key.

Prefereably to use Enter for Windows and Return for Mac; as long as there’s no difference between Return or Enter in your software.

answered Dec 31, 2016 at 19:05

Liggliluff's user avatar

LiggliluffLiggliluff

1891 silver badge5 bronze badges

What is the target platform for your CLI application? This should guide your decision.

Enter is more common on non-Apple keyboards.

Return is the standard for Apple keyboards with ‘enter’, as you point out, sometimes written about the key.

A third incarnation is simple using an icon on the key:

enter image description here

If you use a single word to describe the key, you should use the label used most often for your target platform. ‘Enter’ for Windows/Unix, ‘Return’ for OSX.

You could also, in the introduction to your instructions, place the phrase similar to:

The ‘Enter’/’Return’ key, hereinafter referred to as the ‘Return’ key.

… or ‘Enter’, depending on your target platform.

Community's user avatar

answered Mar 22, 2014 at 18:35

Nicholas Pappas's user avatar

Nicholas PappasNicholas Pappas

17.5k5 gold badges52 silver badges58 bronze badges

1

Expanding slightly on Evil Closet Monkey’s answer, the key on the right of Apple keyboards is unambiguously the return key. Some older Apple keyboards, and the current Apple Keyboard with Numeric Keypad, have a separate enter key.

You can type enter using the combination fnreturn.

Stevoisiak's user avatar

answered Nov 18, 2015 at 20:10

Douglas Hill's user avatar

Enter semantically makes more sense than Return. «Enter» corresponds to entering data for data entry. «Return» is a vestige from the «carriage return» of typewriters, a concept I would not expect most people today to know or understand. Nowadays «Return» conceivably even could be confused with a Back button.

answered Jul 4, 2020 at 9:41

jamesdlin's user avatar

jamesdlinjamesdlin

4184 silver badges7 bronze badges

It is understood either way.

Looking at the usage of a phrase that is specific to the context of a keyboard up to the year 1989 «return» was favored but got overtaken by «enter» and shortly thereafter the phrase fell out of usage altogether it seems.

enter image description here

It’s easy to sidestep the issue by simply using ⏎ , which is the return symbol.
One line down and returning to the beginning of the line on the left.

answered Sep 8, 2022 at 18:05

Ocean's user avatar

OceanOcean

1011 bronze badge

1

RETURN is a better word to use than ENTER. Primarily because of abusive illegal invasion.

ASCII has D base 15+ listed as the CTRL code for CODE RETURN. Can’t find the CTRL CODE for ENTER.

ASCII 245 is cool, §§§ ASCII 189 is ¢¢¢.

ALPHA SALOME SMITH NO-ONE CODER, AKA NOX

answered Mar 4, 2020 at 1:55

SALOME SMITH's user avatar

1

Понравилась статья? Поделить с друзьями:
  • Word coat of arms
  • Word coach что это такое
  • Word clues for crossword puzzles
  • Word clouds на русском языке
  • Word clouds with shapes