Skip to content

Commit

Permalink
Use the kbd text role in the docs for keyboard commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
saschazelzer committed Jan 20, 2017
1 parent 98c8ccf commit cb2c6da
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 30 deletions.
18 changes: 18 additions & 0 deletions doc/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,22 @@

.wy-nav-content {
max-width: 860px !important;
}

.kbd {
-moz-border-radius:3px;
-moz-box-shadow:0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset;
-webkit-border-radius:3px;
-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset;
background-color:#f7f7f7;
border:1px solid #ccc;
border-radius:3px;
box-shadow:0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset;
color:#333;
font-family:Arial,Helvetica,sans-serif;
font-size:11px;
line-height:1.4;
margin:0 .1em;
padding:.1em .6em;
text-shadow:0 1px 0 #fff;
}
4 changes: 2 additions & 2 deletions doc/src/tutorial/Example1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ a small driver program called ``usTutorialDriver``::
status Print status information
shutdown Shut down the framework

Typing ``status`` at the command prompt lists all installed bundles and
Typing :kbd:`status` at the command prompt lists all installed bundles and
their current state. Note that the driver program pre-installs the
example bundles, so they will be listed initially with the ``INSTALLED``
state. To start the eventlistener bundle, type ``start eventlistener``
Expand All @@ -101,4 +101,4 @@ its shared library). Keep in mind, that this bundle will not do much at
this point since it only listens for service events and we are not
registering any services. In the next example we will register a service
that will generate an event for this bundle to receive. To exit the
``usTutorialDriver``, use the ``shutdown`` command.
``usTutorialDriver``, use the :kbd:`shutdown` command.
12 changes: 6 additions & 6 deletions doc/src/tutorial/Example2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ meta-data for our bundle; the manifest file contains the following:
For an introduction how to compile our source code, see :any:`example1`.

After running the ``usTutorialDriver`` program we should make sure that
the bundle from Example 1 is active. We can use the ``status`` shell
the bundle from Example 1 is active. We can use the :kbd:`status` shell
command to get a list of all bundles, their state, and their bundle
identifier number. If the Example 1 bundle is not active, we should
start the bundle using the ``start`` command and the bundle's identifier
number or symbolic name that is displayed by the ``status`` command. Now
start the bundle using the :kbd:`start` command and the bundle's identifier
number or symbolic name that is displayed by the :kbd:`status` command. Now
we can start our dictionary service bundle by typing the
``start dictionaryservice`` command::
:kbd:`start dictionaryservice` command::

CppMicroServices-build> bin/usTutorialDriver
> status
Expand Down Expand Up @@ -100,7 +100,7 @@ we can start our dictionary service bundle by typing the
8 | spellcheckclient | INSTALLED
>

To stop the bundle, use the ``stop <id | name>`` command. If the bundle
To stop the bundle, use the :kbd:`stop 2` command. If the bundle
from :any:`Example 1 <example1>` is still
active, then we should see it print out the details of the service event
it receives when our new bundle registers its dictionary service. Using
Expand All @@ -109,4 +109,4 @@ start it at will, respectively. Each time we start and stop our
dictionary service bundle, we should see the details of the associated
service event printed from the bundle from Example 1. In
:any:`Example 3 <example3>`, we will create a client for our dictionary
service. To exit ``usTutorialDriver``, we use the ``shutdown`` command.
service. To exit ``usTutorialDriver``, we use the :kbd:`shutdown` command.
10 changes: 5 additions & 5 deletions doc/src/tutorial/Example2b.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ and linker dependencies are set:
:language: cmake

After running the ``usTutorialDriver`` program we should make sure that
the bundle from Example 1 is active. We can use the ``status`` shell
the bundle from Example 1 is active. We can use the :kbd:`status` shell
command to get a list of all bundles, their state, and their bundle
identifier number. If the Example 1 bundle is not active, we should
start the bundle using the start command and the bundle's identifier
number or name that is displayed by the ``status`` command. Now we can
number or name that is displayed by the :kbd:`status` command. Now we can
start our dictionary service bundle by typing the
``start frenchdictionary`` command::
:kbd:`start frenchdictionary` command::

CppMicroServices-build> bin/usTutorialDriver
> status
Expand Down Expand Up @@ -78,7 +78,7 @@ start our dictionary service bundle by typing the
8 | spellcheckclient | INSTALLED
>

To stop the bundle, use the ``stop <id | name>`` command. If the bundle
To stop the bundle, use the :kbd:`stop 3` command. If the bundle
from :any:`Example 1 <example1>` is still
active, then we should see it print out the details of the service event
it receives when our new bundle registers its dictionary service. Using
Expand All @@ -87,7 +87,7 @@ start it at will, respectively. Each time we start and stop our
dictionary service bundle, we should see the details of the associated
service event printed from the bundle from Example 1. In
:any:`Example 3 <example3>`, we will create a client for our dictionary
service. To exit ``usTutorialDriver``, we use the ``shutdown`` command.
service. To exit ``usTutorialDriver``, we use the :kbd:`shutdown` command.

.. note::

Expand Down
6 changes: 3 additions & 3 deletions doc/src/tutorial/Example3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Example 1, we must link our bundle to the ``dictionaryservice`` bundle:
:language: cmake

After running the ``usTutorialDriver`` executable, and starting the
event listener bundle, we can use the ``start dictionaryclient`` command
event listener bundle, we can use the :kbd:`start dictionaryclient` command
to start our dictionary client bundle::

CppMicroServices-debug> bin/usTutorialDriver
Expand All @@ -46,8 +46,8 @@ to start our dictionary client bundle::
The above command starts the pre-installed bundle. When we start the bundle,
it will use the main thread to prompt us for words. Enter one word at a
time to check the words and enter a blank line to stop checking words.
To reload the bundle, we must first use the ``stop <id | name>`` command
to stop the bundle, then the ``stop <id | name>`` command to re-start
To reload the bundle, we must first use the :kbd:`stop dictionaryclient` command
to stop the bundle, then the :kbd:`start dictionaryclient` command to re-start
it. To test the dictionary service, enter any of the words in the
dictionary (e.g., "welcome", "to", "the", "micro", "services",
"tutorial") or any word not in the dictionary.
Expand Down
6 changes: 3 additions & 3 deletions doc/src/tutorial/Example4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ bundle:
:language: cmake

After running the ``usTutorialDriver`` executable, and starting the
event listener bundle, we can use the ``start dictionaryclient2``
event listener bundle, we can use the :kbd:`start dictionaryclient2`
command to start our robust dictionary client bundle::

CppMicroServices-debug> bin/usTutorialDriver
Expand All @@ -60,8 +60,8 @@ command to start our robust dictionary client bundle::
The above command starts the bundle and it will use the main thread to
prompt us for words. Enter one word at a time to check the words and
enter a blank line to stop checking words. To reload the bundle, we must
first use the ``stop <id | name>`` command to stop the bundle, then the
``start <id | name>`` command to re-start it. To test the dictionary
first use the :kbd:`stop dictionaryclient2` command to stop the bundle, then the
:kbd:`start dictionaryclient2` command to re-start it. To test the dictionary
service, enter any of the words in the dictionary (e.g., "welcome",
"to", "the", "micro", "services", "tutorial") or any word not in the
dictionary.
Expand Down
6 changes: 3 additions & 3 deletions doc/src/tutorial/Example5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Again, we must link our bundle to the ``dictionaryservice`` bundle:
:language: cmake

After running the ``usTutorialDriver`` executable, and starting the
event listener bundle, we can use the ``start dictionaryclient3``
event listener bundle, we can use the :kbd:`start dictionaryclient3`
command to start our robust dictionary client bundle::

CppMicroServices-debug> bin/usTutorialDriver
Expand All @@ -55,8 +55,8 @@ command to start our robust dictionary client bundle::
The above command starts the bundle and it will use the main thread to
prompt us for words. Enter one word at a time to check the words and
enter a blank line to stop checking words. To re-start the bundle, we
must first use the ``stop <id | name>`` command to stop the bundle, then
the ``start <id | name>`` command to re-start it. To test the dictionary
must first use the :kbd:`stop dictionaryclient3` command to stop the bundle, then
the :kbd:`start dictionaryclient3` command to re-start it. To test the dictionary
service, enter any of the words in the dictionary (e.g., "welcome",
"to", "the", "micro", "services", "tutorial") or any word not in the
dictionary.
Expand Down
10 changes: 5 additions & 5 deletions doc/src/tutorial/Example6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ For an introduction how to compile our source code, see
:any:`example1`.

After running the ``usTutorialDriver`` program we should make sure that
the bundle from Example 1 is active. We can use the ``start`` shell
the bundle from Example 1 is active. We can use the :kbd:`status` shell
command to get a list of all bundles, their state, and their bundle
identifier number. If the Example 1 bundle is not active, we should
start the bundle using the start command and the bundle's identifier
number or symbolic name that is displayed by the ``start`` command. Now
number or symbolic name that is displayed by the :kbd:`status` command. Now
we can start the spell checker service bundle by entering the
``start spellcheckservice`` command which will also trigger the starting
:kbd:`start spellcheckservice` command which will also trigger the starting
of the dictionaryservice bundle containing the english dictionary::

CppMicroServices-build> bin/usTutorialDriver
Expand All @@ -109,7 +109,7 @@ of the dictionaryservice bundle containing the english dictionary::

To trigger the registration of the spell checker service from our
bundle, we start the frenchdictionary using the
``start frenchdictionary`` command. If the bundle from
:kbd:`start frenchdictionary` command. If the bundle from
:any:`Example 1 <example1>` is still active,
then we should see it print out the details of the service event it
receives when our new bundle registers its spell checker service::
Expand All @@ -126,4 +126,4 @@ the eventlistener bundle will print that our bundle is no longer
offering its spell checker service. Likewise, when the french dictionary
service comes back, so will our spell checker service. We create a
client for our spell checker service in :any:`Example 7 <example7>`. To
exit the ``usTutorialDriver`` program, we use the ``shutdown`` command.
exit the ``usTutorialDriver`` program, we use the :kbd:`shutdown` command.
6 changes: 3 additions & 3 deletions doc/src/tutorial/Example7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ services. The source code for our bundle is as follows in a file called
:start-after: [Activator]
:end-before: [Activator]

After running the ``usTutorialDriver`` program use the ``s`` command to
After running the ``usTutorialDriver`` program use the :kbd:`status` command to
make sure that only the bundles from Example 2, Example 2b, and Example
6 are started; use the start (``start <id | name>``) and stop
(``stop <id | name>``) commands as appropriate to start and stop the
various tutorial bundles, respectively. Now we can start our spell
checker client bundle by entering ``start spellcheckclient``::
checker client bundle by entering :kbd:`start spellcheckclient`::

CppMicroServices-build> bin/usTutorialDriver
> start eventlistener
Expand All @@ -47,7 +47,7 @@ checker client bundle by entering ``start spellcheckclient``::

To trigger the registration of the spell checker service from our
bundle, we start the frenchdictionary using the
``start frenchdictionary`` command. If the bundle from
:kbd:`start frenchdictionary` command. If the bundle from
:any:`Example 1 <example1>` is still active, then we should see it
print out the details of the service event it receives when our new
bundle registers its spell checker service::
Expand Down

0 comments on commit cb2c6da

Please sign in to comment.