ことに(は)
koto ni (wa)
to my ~ (expressing emotion)
[To my ~ (emotion)]
Connection: Adj (驚いた/嬉しい/悲しい/残念な/困った etc.) + ことに(は)
Usage: Used to express the speaker's emotional reaction before stating the content. Placed at the beginning of the sentence.
Common combinations: 驚いたことに (to my surprise), 嬉しいことに (to my joy), 悲しいことに (sadly), 残念なことに (unfortunately), 困ったことに (troublingly)
Examples:
驚いたことに、彼はもう結婚していた。(To my surprise, he was already married.)
嬉しいことに、全員合格した。(Happily, everyone passed.)
困ったことに、財布を忘れてきた。(Unfortunately, I forgot my wallet.)