A program like xmacro
may be of help:
xmacrorec can be used to record mouse and keyboard events on any X11 display.
.
xmacroplay can be used to playback recorded events or send any other
mouse/keyboard events you choose. It is very handy for scripting an
X display - for example controlling a presentation in mgp or ultrapoint
from a script, network connection...
.
xmacroplay-keys is a script to help use the above.
If I'm understanding this correctly, you'd first define a macro for ctrl+shift+u (note it's shift rather than control, your original post has a small mistake in this respect), then use use Ubuntu's keyboard shortcuts to execute xmacroplay to "play back" your macro.
I have to admit I haven't really tried this myself, as I think a much better solution would be to ask yourself why your users need to enter cryptic Unicode characters by hand, instead of having a keyboard layout that allows them to do so natively. You mention the specific case of Ñ, which can be very easily entered in spanish or latin american keyboard layouts.
Moreover, if you have a US keyboard, you can use the "English (International AltGr dead keys)" layout to enter special characters for many languages, mainly by using AltGr (e.g. AltGr+n = ñ, AltGr+vowel = accents (áéíóú) and so on) .
I suggest you configure this keyboard layout and then click on the small keyboard icon in the Keyboard Layouts control panel to see all the key mappings; chances are, most special characters you are likely to need can be entered with this layout and it will be easier to remember than Unicode codes and three-key combinations, since the mappings are generally quite intuitive (AltGr + ? = ¿, for instance).
I also disagree with the idea that entering ASCII characters in Windows is easier for newcomers. The key is just as arbitrary (Alt + NumPad?), the codes are just as arbitrary to memorize (and it breaks my heart to see the little ASCII code charts pasted on people's desks), and this "crutch" also stems from the same underlying problem, which is a misconfigured keyboard layout.
I do apologize for ranting, and I hope my answer proves useful; if you are unable for some reason to set a keyboard layout as I suggest, maybe you could update your question with more details in this regard so either I or someone else can provide a more useful solution.
Best Answer
As you observed, many Unicode characters can be entered in gtk-based applications using Ctrl+Shift+u followed by a specific alphanumeric string but such an approach doesn't work at all in Kate or Konsole. This has been the case since 2005 at least.
One has to instead use a Compose key. To do that, open System Settings > Input Devices > Keyboard > Advanced. In there, scroll down to Position of Compose Key. Expand that by clicking on > and choose a convenient key. I chose Caps Lock. Be aware that you'll no longer have the normal function of that key or any other key you set as the Compose key:
Once that is done, create an empty (hidden) file called
.XCompose
in your home folder and add the following line:Save the file. Then, examine
/usr/share/X11/locale/en_US.UTF-8/Compose
for suitable code as shown in an answer to How to type unicode characters in KDE?.Here's a few examples copied from the answer:
If you still find there are symbols that you can't generate in Kate or Konsole such as the one in your question, ሴ, a very, very, ugly workaround is to make a text file in a gtk text editor, generate all the missing symbols there, save the file and then copy/paste as needed into Kate or Konsole whenever you need them. That works just fine and saves the trouble of memorising a list of Unicode characters.