I want spaced keywords in listings (that is, keyword, with spaces in between).
Now, there are some questions in this site already answered, like this one, where the official answer is that “it is not possible”. But, of course, like almost everything, there are workarounds that let you do it.
However, I've seen in the documentation of microtype correctly highlighted keywords that do contain spaces (e.g., no ligatures, outer kerning, outer spacing).
That's all. If I didn't make myself clear, please, leave a comment. That's the question: I want to reproduce the system used in microtype's documentation.
Update
As @Robert noted, he used latin1 encoding in the documentation. Which seems to work nice with lstlisting (apart from non-breaking spaces, it even accepts, e.g., á, ü by default). But I use utf8 (not for anything special, but because it's recommended everywhere), which doesn't behaves well with listings. Since I like this idea of using non-breaking spaces to define keywords with spaces, I will rewrite my question
Is there a way to teach utf8/listings to understand non-breaking spaces inside of keywords?
Here is a minimal non-working example:
NOTE: the space between spaced and keyword is a non-breaking space (as you can see in the image below).
\documentclass{scrartcl}
%\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenx} % With latin1 it works perfectly
\usepackage{listings}
\lstset{keywords={spaced keyword}, columns=fullflexible}
\begin{document}
\begin{lstlisting}
notakeyword spaced keyword notakeyword
\end{lstlisting}
\end{document}

listingsonly allows ASCII characters in keywords, and the non-breaking space is an extended-ASCII character (its decimal code is in [128,255]). Highlighting keywords containing ext.-ASCII chars involve that kind of dirty and far-from-optimal tricks: http://tex.stackexchange.com/questions/122850/how-to-insert-a-keyword-with-accents-extendedchars-in-listings – jub0bs Jun 16 '14 at 16:01microtypemanual (microtype.dtx) doesn't uselistingsat all for typesetting "outer spacing", "outer kerning", "no ligatures" as shown on p17 of that manual. Instead, this is done via a macro called\keydefined with\DeclareRobustCommand\key[1]{\textcolor{thered}{\ttfamily#1}}inmicrotype.dtx. No non-breaking space is involved or necessary for that. – jub0bs Jun 16 '14 at 17:38microtypeis a contributor to TeX.SX. I'm sure he's the best person to answer this. – jub0bs Jun 16 '14 at 19:23microtypelabel to draw his attention? – Manuel Jun 16 '14 at 19:34inputencwith an encoding that (1) contains the non-breaking space and (2) is notutf8becauselistingswon't like it. (microtype.dtxuseslatin1). – Robert Jun 17 '14 at 23:53utf8is recommended (and that's the only reason I use it). (1) Is it possible to teach the non-breaking space toutf8? (2) Is there a workaround so thatutf8won't collide withlistings? You can post an answer, but I will wait a little more to see if someone offers a solution. – Manuel Jun 18 '14 at 08:49linstingsplus UTF8. See http://tex.stackexchange.com/questions/176694/non-ascii-character-as-argument/193954#193954 including my first comment about LaTeX usage of encTeX. – wipet Aug 07 '14 at 02:47