Script or Command for selecting Adjacent Faces in Blender (see image)
Bmesh and sets.



Use sets because there will only be one instance of an item.

One set is our selected faces.

For all the vertices in each selected face, look at the link faces loop (all edges connected to that vert) and add any face that isn't  already selected to another set.

import bpy
import bmesh
context = bpy.context
ob = context.edit_object
me = ob.data
bm = bmesh.from_edit_mesh(me)

sel_faces = set(f for f in bm.faces if f.select)

grow_faces =  set(fs for f in sel_faces for v in f.verts for fs in v.link_faces if not fs.select)

for f in sel_faces:
    f.select = False
for f in grow_faces:
    f.select = True

bmesh.update_edit_mesh(me)


Note: For keypress operation convert this into an operator, because I'm feeling generous here is above pasted into Text editor &gt; Templates &gt; Python &gt; Simple Operator

import bpy
import bmesh

class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"

    @classmethod
    def poll(cls, context):
        return context.edit_object is not None

    def execute(self, context):
        ob = context.edit_object
        me = ob.data
        bm = bmesh.from_edit_mesh(me)

        sel_faces = set(f for f in bm.faces if f.select)

        grow_faces =  set(fs for f in sel_faces for v in f.verts for fs in v.link_faces if not fs.select)

        for f in sel_faces:
            f.select = False
        for f in grow_faces:
            f.select = True

        bmesh.update_edit_mesh(me)
        return {'FINISHED'}


def register():
    bpy.utils.register_class(SimpleOperator)


def unregister():
    bpy.utils.unregister_class(SimpleOperator)


if __name__ == "__main__":
    register()

    # test call
    bpy.ops.object.simple_operator()