How can teaching staff improve a passive student group?
Some are busy in coding, some are reading research articles, some are doing something else.


I have seen (and participated in) this exact behaviour in classes that are minor and irrelevant to the study path students take. This might be an Ecology class for Physics majors, or a Science class for Language majors. Thus, step 1 is to understand students' motivations behind taking your class. If your students only take classes because some governing body requires them to, you have little room to improve their motivation.

To find if this is the case, try asking the students: either directly or by collecting an anonymous poll with 'What is your motivation for this course?' question. If the answers indicate that their motivation is external, adapt.

One strategy I can think of is changing the lectures to project work, literally making the students learn on their own. However, what to do with students who only have external motivation is a separate question.
EDIT: since the students seem to be taking the class for the sake of a good transcript, they will not interact with you in the lectures. Their goal is to sit through the lecture, "nine-to-five", and minimize the effort, subject to reaching a passing grade. (Ironically, students are good at solving these kinds of optimization problems.) My advice still holds: if a student is given a project to work on, be it a program, a research report, an essay, a survey, you name it, he has much less space to slack than in a lecture.