random keys, but nothing appears on the screen.’
Try to use you custom keylayout in TextEdit and LibreOffice or OpenOffice. Do they work OK?
The only cause I may see may be due to keylayout ID, it should be unicode (negative number, from -1 through -32768) or Cyrillic (19456 through 19967), go to Keyboard/Set Keyboard ID. Create two variants with different names (e.g. My-Cyrillic 1 and My-Cyrillic-2 or anything similar).
If your keylayout works OK in a series of apps, but not with Word only (the last version should be unicode aware, that is why I asked which version), this may be strange.
Let us know whether this works.